0

我正在尝试在我的网站上添加 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'
  }
});
}

当我分享时,我收到一条错误消息:请稍后再试。我怎样才能摆脱错误?

4

0 回答 0