简体   繁体   English

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

[英]Having problems using the FaceBook Javascript SDK cannot access UI

I am trying to use the facebook javascript SDK to bring up a simple application request window. 我正在尝试使用facebook javascript SDK来显示一个简单的应用程序请求窗口。 However when I attempt to do so absolutely nothing happens. 但是,当我试图这样做时,绝对没有任何反应。

Here is my code. 这是我的代码。

<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>

And then I call 然后我打电话

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

Can someone please explain what I am doing wrong? 有人可以解释一下我做错了什么吗?

You need to be running this page from a URL that has been authorized on the developer site . 您需要从开发人员站点上已授权的URL运行此页面。 Facebook设置

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM