问题
I am working on a HTML5 mobile app, using cordova 2.6, and I am targetting iOS, Android BlackBerry and Windows Phone.
I am trying to implement Facebook sharing feature using Facebook JavaScript SDK. I am trying to do it inside Corodova InAppBrowser
My FB.init function is as following:
FB.init({
appId : '0000000000',
channelUrl : './js/libs/fb/channel.html',
status : true
});

I am having the error :

Is there anything wrong with my Facebook app configuration, or my FB.init function?
回答1:
If you wish to use Facebook JS SDK methods inside a phonegap project, you need to use the Facebook Plugin
When you try doing it as a regular website, Facebook blocks you since you didn't provide them the authorized domain. the problem is, your JS code runs locally on each device so you don't have such a domain, and therefor you cannot use the Facebook JS SDK.
you can avoid the plugin by using some other methods, like a using a childbrowser plugin (look at: this example)
good luck
来源:https://stackoverflow.com/questions/19652002/facebook-channel-url-for-cordova-app