2012-06-18 109 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