使用FaceBook Javascript SDK时遇到问题无法访问UI

时间:2011-08-24 21:12:17

标签: javascript facebook user-interface sdk

我正在尝试使用facebook javascript SDK来显示一个简单的应用程序请求窗口。然而,当我试图这样做时,绝对没有任何事情发生。

这是我的代码。

<html xmlns="http://www.w3.org/1999/xhtml" xmlns:fb="https://www.facebook.com/2008/fbml">
<div id="fb-root"></div>
<script src="http://connect.facebook.net/en_US/all.js"></script>
<script>
  FB.init({
    appId  : '151092658309155',
    status : true, // check login status
    cookie : true, // enable cookies to allow the server to access the session
    xfbml  : true, // parse XFBML
    channelUrl : 'channel.html', // channel.html file
    oauth  : true // enable OAuth 2.0
  });
</script>

然后我打电话给

<script>FB.ui({method: 'apprequests', message: 'You should learn more about this awesome game.', data: 'tracking information for the user'});</script>";

有人可以解释一下我做错了吗?

1 个答案:

答案 0 :(得分:2)

您需要从developer site授权的网址运行此页面。Facebook settings