2011-08-23 21 views
10

我有PHP和JavaScript的經驗,但相信新的使用Facebook的API。我仔細閱讀了文檔,但注意到文檔中的很多鏈接都被破壞了。例如,鏈接,http://api.facebook.com/static/xd_receiver.htm是broekn和我需要的內容能夠做到幾乎與FB API什麼。說真的,這些人似乎真的把他們的文件丟下了球。有誰知道我可以在哪裏得到這個文件和JavaScript SDK的其餘部分?謝謝。哪裏可以下載Facebook的JavaScript SDK和xd_receiver.htm

+0

你在哪裏看到斷開的鏈接文檔?如果你在這裏提供一個鏈接,我會看到,如果我們可以把它固定,使其指向正確的位置 – Igy

回答

19
<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文件的內容應該是這樣的一行的鏈接:

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

這裏是直接鏈接,應與此https://developers.facebook.com/docs/reference/javascript/#loading幫助 – afreeland

相關問題