Facebook分享按钮不起作用

时间:2012-09-27 07:48:51

标签: facebook share

我正在尝试在我的网站上添加Facebook共享,并检查用户是否共享。以下是我的代码。

<script src="http://connect.facebook.net/en_US/all.js"></script>
<input type="button"
  onclick="share_me(); return false;"
  value="Share"
/>

的javascript:

FB.init({appId:365897140152061 ,status: true, cookie: true});
function share_me() {

FB.ui({
  method: 'feed',
  app_id: '365897140152061',
  link: 'https://developers.facebook.com/docs/reference/dialogs/',
  picture: 'http://fbrell.com/f8.jpg',
  name: 'Facebook Dialogs',
  caption: 'Reference documentation',
  description: 'Using%20Dialogs%20to%20interact%20with%20users.',
  message: 'thanks for visting'
},
function(response){
  if(response && response.post_id) {
    self.location.href = 'http://www.google.com'
  }
  else {
    self.location.href = 'http://www.yahoo.com'
  }
});
}

当我分享时,我收到一条错误消息:请稍后再试。我该如何摆脱错误?

0 个答案:

没有答案