2012-06-18 108 views
-1

因此,我使用FB API将消息发布到用户的墙上。我的代码如下:fb.ui post to wall not working

<script type="text/javascript"> 
    FB.ui({ 
     method: 'post', 
     message: 'Testing Message', 
     caption: 'This is the Caption value.', 
     name: 'Testing JS feed dialog on Antoher Feed', 
     link: 'http://anotherfeed.com?ref=link', 
     description: 'Testing property links, and action links via Feed Dialog Javascript SDK', 
     picture: 'https://shawnsspace.com/ShawnsSpace.toon.nocolor..png', 
     properties: 
     [ 
      { 
       text: 'Link Test 1', href: 'http://anotherfeed.com?ref=1' 
      }, 
      { 
       text: 'Link Test 2', href: 'http://anotherfeed.com?ref=2' 
      }, 
     ], 
     actions: 
     [ 
      { 
       name: 'Shawn', link: 'http://anotherfeed.com' 
      } 
     ]  
    }); 
</script> 

不工作......任何想法?

+0

“不工作” 不提供任何信息,为您提供解决方案。明确说明什么是问题,你可以在控制台中看到什么错误信息? – Venu

+0

没有给出错误信息。通常情况下,另一个窗口应该弹出并提示您是否可以在墙上张贴。但是,事实并非如此。 – Lance

回答

1

尝试改变

FB.ui({ 
     method: 'post', 

FB.ui({ 
     method: 'feed', 

Example

+0

nope。仍然不起作用 – Lance

+0

你有Facebook在你的代码初始化?检查我发布在我的答案(链接) – Venu

+0

的例子是的,我这样做。但是,当我在Chrome上打开JS控制台时,收到消息“GET http://sportannica.com/connect.facebook.net/en_US/all.js 404(Not Found)” – Lance