问题
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