我有一個使用Facebook登錄的基於Worklight的應用程序。當我預覽一切正常(我可以點擊登錄按鈕,顯示Facebook的登錄對話框),但是當我在Android模擬器或設備上運行它,我得到的logcat以下錯誤:IBM Worklight - config app facebook在真實設備上運行
05-28 09:17:35.391: I/Web Console (751): URL has not been configured
> to allow application.: One or more of the provided URL is not set app
> permissions. URL must match the URL of the web page or the page URL or
> domain is a subdomain of the domain of application. at
> https://www.facebook.com/connect/ping?client_id=321009794697186&response_type=token%2Csigned_request%2Ccode&domain=&origin=2&redirect_uri=http%3A%2F%2Fstatic.ak.facebook.com%2Fconnect%2Fxd_arbiter.php%3Fversion%3D24%23cb%3Df1eae8b44c%26origin%3Dfile%253A%252F%252F%252Ff3688c0c94%26domain%3D%26relation%3Dparent&sdk=joey:1
這是在應用我的Facebook配置:
window.fbAsyncInit = function() { FB.init({
appId : 'xxxxx', // App ID // channelUrl : 'http://stormy-sands-2143.herokuapp.com/channel.html', // Channel File
status : true, // check login status
cookie : true, // enable cookies to allow the server to access the session
xfbml : true, // parse XFBML
oauth: true });
};
// Load the SDK asynchronously (function(d){
var js, id = 'facebook-jssdk'; if (d.getElementById(id)) {return;}
js = d.createElement('script'); js.id = id; js.async = true;
js.src = "http://connect.facebook.net/en_US/all.js";
d.getElementsByTagName('head')[0].appendChild(js); }(document));
這是facebook.com應用我的Facebook配置:
我需要做什麼來配置這在一個設備上運行?
這有幫助嗎? http://stackoverflow.com/questions/13079285/login-with-facebook-with-my-ibm-worklight-web-application –
我試過這個,但它不工作。有什麼辦法嗎? – user2265231
爲什麼你的功能的開始註釋掉了? //函數(d){ –