2012-11-12 73 views
1

我只是试过,看了一切 - 但不知何故,我仍然无法处理这个问题。 有没有人有线索?喂养Facebook API错误代码191 - 我做错了什么?

详情请看: http://i1145.photobucket.com/albums/o501/King_Coatie/notworking.gif

+0

尝试禁用沙盒模式,看看是否有帮助,也尝试删除应用程序域,然后尝试。它可能是那些神秘的沙箱“功能”之一。另外 - 我没有看到你的FB.init与你的appID任何地方(在JavaScript SDK结束,而不是PHP)。 –

+0

已禁用沙箱 - >没有任何更改...然后我删除了应用程序域并再次添加 - >没有任何更改...将appID添加到我的FB.Init - >并且再次没有任何更改...错误仍然弹出。 。其他想法? :/ – Kris

回答

0

尝试加载和初始化的Javascript SDK像它的如下所示:

<div id="fb-root"></div> 
<script> 
window.fbAsyncInit = function() { 
// init the FB JS SDK 
FB.init({ 
    appId  : 'YOUR_APP_ID', // App ID from the App Dashboard 
    channelUrl : '//WWW.YOUR_DOMAIN.COM/channel.html', // Channel File for x-domain communication 
    status  : true, // check the login status upon init? 
    cookie  : true, // set sessions cookies to allow your server to access the session? 
    xfbml  : true // parse XFBML tags on this page? 
}); 

// Additional initialization code such as adding Event Listeners goes here 

}; 

    // Load the SDK's source Asynchronously 
(function(d, debug){ 
var js, id = 'facebook-jssdk', ref = d.getElementsByTagName('script')[0]; 
if (d.getElementById(id)) {return;} 
js = d.createElement('script'); js.id = id; js.async = true; 
js.src = "//connect.facebook.net/en_US/all" + (debug ? "/debug" : "") + ".js"; 
ref.parentNode.insertBefore(js, ref); 
}(document, /*debug*/ false)); 
</script> 

http://developers.facebook.com/docs/reference/javascript/

您需要提供的appid到FB对象上,识别它正在处理的应用程序。

+0

即使在我更改Init脚本并将app_id添加到我的函数postToFeed之后...仍然有相同的错误:/ – Kris

+0

您需要将appId提供给init函数,而不是您的postToFeed函数。还要确保在FB.init()之前不要调用该函数。我最好的猜测是它是FB.init()的一部分。如果不是这样,请尝试用redirect_uri中的http替换https,因为您调用非安全Facebook SDK(http)并希望它打开安全重定向(https),这可能是冲突。 –