2

我在本地测试过,一切正常。弹出新窗口和帖子。不过,既然推住了。实时站点 facebook 弹出窗口出现,但 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>

提前感谢您的建议和建议。

4

1 回答 1

0
于 2013-03-09T14:09:01.073 回答