【问题标题】:Feeding in Facebook API Error Code 191 - what I am doing wrong?输入 Facebook API 错误代码 191 - 我做错了什么?
【发布时间】:2012-10-31 19:22:32
【问题描述】:

我刚刚尝试过,阅读了所有内容 - 但不知何故,我仍然无法解决这个问题。 有人知道吗?

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

【问题讨论】:

  • 尝试禁用沙盒模式,看看是否有帮助,也尝试删除应用程序域,然后尝试。它可能是那些神秘的沙盒“功能”之一。另外 - 我在任何地方都看不到您的 FB.init 和您的 appID(在 javascript SDK 端,而不是 PHP)。
  • Disabled Sandbox -> 没有任何变化......然后我删除了应用程序域并再次添加它们 -> 没有任何变化......将 appID 添加到我的 FB.Init -> 再次没有任何变化...... .错误仍然弹出...还有其他想法吗? ://

标签: javascript facebook api error-handling feed


【解决方案1】:

尝试加载和初始化 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/

您需要向 FB 对象提供 appID,以便它识别正在处理的应用程序。

【讨论】:

  • 即使在我更改了 Init 脚本并将 app_id 添加到我的函数 postToFeed ... 之后,仍然出现相同的错误:/
  • 您需要将 appId 提供给 init 函数,而不是您的 postToFeed 函数。还要确保您没有在 FB.init() 之前调用该函数。我最好的猜测是它是 FB.init() 部分。如果不是这样,请尝试在 redirect_uri 中将 https 替换为 http,因为您正在调用非安全 Facebook SDK (http) 并希望它打开安全重定向 (https),​​这可能是冲突。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 2011-11-16
  • 1970-01-01
  • 1970-01-01
  • 2012-10-29
  • 1970-01-01
  • 2013-03-13
  • 1970-01-01
相关资源
最近更新 更多