我在当地测试过,一切正常。弹出新窗口和帖子。但是,因为推动直播。现场网站facebook popup出现但2秒后消失,不再显示自己。
为什么会发生这种情况?我需要注意哪些内容会导致此类问题的本地和实时网站?
<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 :(得分:0)