2013-03-07 83 views
2

我測試了我的本地,一切正常。彈出新窗口和帖子。但是,由於推動生活。現場網站的Facebook彈出窗口出現,但在2秒後消失,不再顯示。發佈到牆facebook api當地工作,但沒有生活

爲什麼會發生這種情況?我需要注意哪些地方和活動網站之間會導致類似問題?

<script src='http://connect.facebook.net/en_US/all.js'></script> 
<script type="text/javascript"> 

    FB.init({appId: "11111818811881", status: true, cookie: true}); 

    function postToFeed(description) { 

    // calling the API ... 
    var obj = { 
     method: 'feed', 
     redirect_uri: 'https://thelivesite.com/dashboard/all/', 
     link: 'https://developers.facebook.com/docs/reference/dialogs/', 
     picture: 'https://www.thelivesite.com/static/images/logo.png', 
     name: 'LiveSiteName', 
     caption: 'Meow', 
     description: description 
    }; 

    function callback(response) { 
     document.getElementById('msg').innerHTML = "Post ID: " + response['post_id']; 
    } 

    FB.ui(obj, callback); 
    } 
</script> 

<html xmlns="http://www.w3.org/1999/xhtml" 
    xmlns:fb="https://www.facebook.com/2008/fbml"> 

<div id='fb-root'></div>           
<p style="cursor: pointer; display: inline-block; position: absolute; margin-left: -20px;"> 
    <a onclick='postToFeed("This is a message Cool beans."); return false;'></a> 
</p> 
<p id='msg'></p> 

非常感謝您的建議和建議。

+0

有你在應用程序設置中更改了網站網址? – ThePCWizard 2013-03-08 07:58:50

+0

我沒有。我應該嗎?我在settings.py中的所有內容都是FACEBOOK_API_ID,FACEBOOK_API_KEY和FACEBOOK_API_SECRET。 – Modelesq 2013-03-08 17:15:05

回答