1

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

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

4

1 回答 1

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 以使其识别正在处理的应用程序。

于 2012-11-12T11:28:46.387 回答