在Facebook API错误代码191喂养 - 我做错了什么?

时间:2012-11-12 11:03:06

标签: javascript facebook api error-handling feed

我只是尝试过,阅读所有内容 - 但不知怎的,我仍然无法解决这个问题。 有没有人有线索?

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

1 个答案:

答案 0 :(得分: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/

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