2013-10-08 215 views
0

我正在嘗試在我的網頁上設置Facebook發送請求。我有以下代碼...Facebook發送請求不發送請求

<a id="invite-friends" onClick="fb_initiate('#{@app_id}')" href="#">Invite your Friends</a> 

<div id="fb-root"></div> 

<script type="text/javascript" src="http://connect.facebook.net/en_US/all.js#xfbml=1&status=0"> 

<script> 
    function fb_initiate(app_id) { 
    FB.init({ 
     appId: app_id, 
     status:true, 
     xfbml:true 
    }); 

    FB.ui({ method: 'apprequests', 
      message: 'There is so much more to life, other than bill payments. Try BillBaba.com and never miss another bill payment.' 
    }); 
    }; 
</script> 

當我點擊邀請好友鏈接,下面的框里加載...

enter image description here

從那裏我點擊我的朋友,然後點擊發送請求。 Facebook框關閉,但我的朋友都沒有收到這條消息。

我的設置是...

enter image description here

我不知道如何調試這一點。這可能是一個隱私設置問題,或者我的代碼有問題嗎?

+0

你在Facebook上設置了一個畫布應用程序嗎? – CBroe

+0

不,我不知道。我認爲這就是我所缺少的? – jason328

+0

https://developers.facebook.com/docs/howtos/requests/:_「用戶對用戶的請求僅適用於Canvas應用程序,而不適用於網站,因爲接受請求將引導用戶訪問Canvas頁面的URL發送請求的應用程序。「_ – CBroe

回答

2

檢查您的應用程序是否處於沙箱模式。你可以在基本信息部分找到它。 如果啓用沙箱模式,則apprequest將僅發送給與該應用程序關聯的開發人員或測試人員。

添加你的朋友作爲開發人員或測試人員,他們將收到apprequests。

+0

謝謝!!我從來沒有想過我自己。 – jason328