FB.ui Facebook share doesn't work on posts?

冷暖自知 提交于 2019-12-22 12:37:05

问题


When I call the action,

FB.ui({
  method: 'share',

  // this works fine
  href: 'https://www.facebook.com/'

  // this works fine
  href: 'https://www.facebook.com/678506978/'

  // this doesn't
  href: 'https://www.facebook.com/678506978/posts/10152685321776979'
});

More specifically, the window pops up alright, but it's just a blank share window, with nothing beneath to show what I'm sharing. And after I clicked Post to Facebook, it doesn't appear in my timeline, unlike the former two.

My question: how to make sharing a post work?


回答1:


In the end I had to make use of the supposedly deprecated feed action:

FB.ui({
  method: 'feed',
  link: 'link of post',
  name: 'title of post',
  caption: 'description'
});

It works.



来源:https://stackoverflow.com/questions/25440700/fb-ui-facebook-share-doesnt-work-on-posts

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!