facebook feed对话框没有在chrome中打开

时间:2013-05-30 18:41:15

标签: google-chrome facebook-javascript-sdk facebook-opengraph

我正在使用以下代码,对话框显示在我的Chrome中,但是客户端和客户端的客户端chrome不是在IE和firefox中为它们显示的。有什么信息吗?

<script src='http://connect.facebook.net/en_US/all.js'></script>
<script> 
  FB.init({appId: "<?=$config['appId'];?>", status: true, cookie: true});

  function postToFeed() {
    // calling the API ...
    var obj = {
      method: 'feed',
      redirect_uri: '#',
      link: 'https://www.facebook.com/MyPageName/app_<?=$config['appId'];?>',
      picture: 'https://www.abc.com/fbapp/img/welcome.jpg',
      to: friendId,// js variable I am fetching from radio button selection
      name: 'App Blah Blah',
      caption: 'your_caption',
      description: 'your_description'
    };

    function callback(response) {
// I commented out message print in div
//          document.getElementById('msg').innerHTML = "Post ID: " + response['post_id'];

// check weither feedback is valid
        if(typeof(response)!='undefined'){
            document.location = 'thankyou.php';
        }
    }

    FB.ui(obj, callback);
  }

</script>

1 个答案:

答案 0 :(得分:0)

我用过

http://connect.facebook.net/en_US/all.

我用

替换了它
https://connect.facebook.net/en_US/all.js

所有人都很高兴,它在所有浏览器上都可见。