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. 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 statu开发者_如何转开发s
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.
精彩评论