在哪里下载FaceBook JavaScript SDK和xd_receiver.htm [英] Where to download FaceBook JavaScript SDK and xd_receiver.htm

查看:59
本文介绍了在哪里下载FaceBook JavaScript SDK和xd_receiver.htm的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有使用PHP和JavaScript的经验,但是对使用FaceBook API并不陌生.我正在仔细阅读文档,但是请注意,他们文档中的许多链接都已断开.例如, http://api.facebook.com/static/xd_receiver.htm 的链接为broekn,我需要该内容才能使用FB API进行几乎所有操作.认真的说,这些家伙似乎真的在自己的文件中丢了球.有人知道我可以从哪里获得此文件以及JavaScript SDK的其余部分吗?谢谢.

I have experience with PHP and JavaScript, but am new to using the FaceBook API. I'm carefully reading through the documentation, but notice thta lot of links within their documentation are broken. For example, the link for http://api.facebook.com/static/xd_receiver.htm is broekn and I need that content to be able to do almost anything with the FB API. Seriously, these guys seem to have really dropped the ball with their documentation. Does anyone know where I can get this file and the rest of the JavaScript SDK? Thanks.

推荐答案

<div id="fb-root"></div>
<script src="//connect.facebook.net/en_US/all.js"></script>
<script>
  FB.init({
    appId  : 'YOUR APP ID',
    status : true, // check login status
    cookie : true, // enable cookies to allow the server to access the session
    xfbml  : true, // parse XFBML
    channelUrl : 'http://WWW.MYDOMAIN.COM/channel.html', // channel.html file
    oauth  : true // enable OAuth 2.0
  });
</script>

channel.html文件的内容应为以下一行:

The contents of the channel.html file should be this single line:

 <script src="//connect.facebook.net/en_US/all.js"></script>

这篇关于在哪里下载FaceBook JavaScript SDK和xd_receiver.htm的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆