2013-03-07 82 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

回答