2011-10-01 139 views
1

嗨,大家好我有一个de feed对话框的奇怪问题。 它的工作原理pefect在Firefox,但是当我试图把它用在IE或Chrome我得到这个错误“发生错误,请稍后再试Feed对话框在某些浏览器上不起作用

我试图修复它,但我不能。你能帮我吗。 这是我用来调用对话框的代码。

<div id='fb-root'></div> 
<script src='http://connect.facebook.net/en_GB/all.js'></script> 
<a href="#" onclick='postToFeed(); return false;'>Post Feed</a> 


    <script> 
    FB.init({appId: "xxxx", status: true, cookie: true}); 
    function postToFeed() { 
      // calling the API ... 
      var obj = { 
       method: 'feed', 
       link: 'http://apps.facebook.com/xxxx', 
       picture: 'xxxx', 
       name: 'xxxx', 
       caption: 'xxxxx', 
       description: 'xxxxx', 
       properties: [{text: 'xx', href: 'xx'},], 
       actions: [{name: 'xx', link: 'xx'}], 
      }; 

      function callback(response) { 
       document.getElementById('msg').innerHTML = "Well Done!!"; 
      } 

      FB.ui(obj, callback); 
      } 

     </script> 
    </script> 

回答

0

几件事情尝试:

1:它可能是在你的代码在这里流氓逗号后的操作一样简单:

actions: [{name: 'xx', link: 'xx'}], 

尝试删除,但镀铬应该更好地处理,但这会导致IE的问题!

2:使用控制台查看是否引发任何错误。

3:添加的OAuth:忠于你的初始化语句,像这样:

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

4:删除在调用的参数,并通过一个测试它的工作原理,每次添加后添加他们回来一:启动与:

var obj = { 
       method: 'feed', 
       link: 'http://apps.facebook.com/xxxx', 
       picture: 'xxxx', 
       name: 'xxxx', 
       caption: 'xxxxx', 
       description: 'xxxxx' 
      }; 
+0

感谢您的帮助,我发现脚本与社交插件的代码碰撞的promblem。 –

相关问题