开发者

Is there a way to associate the Like button with a Facebook photo or other post on Facebook.com?

开发者 https://www.devze.com 2023-04-01 07:28 出处:网络
If I hav开发者_如何学Pythone a Facebook photo, can I add a Facebook button in an application that when clicked inceases the likes for the photo?

If I hav开发者_如何学Pythone a Facebook photo, can I add a Facebook button in an application that when clicked inceases the likes for the photo?

The parameter for the like button is a url. What do I need to put there so when clicked, increases the like count for the photo on Facebook?


No this is not possible - it's always separate. You could do this through graph API and make POST to <POST ID>/likes/ but the Like button plugin only works for Facebook pages or URLs off-Facebook.

It does not work with content on FAcebook.com


Via the Facebook Like Plugin, as you said is url so it will not work.

The Like Box is a social plugin that enables Facebook Page owners to attract and gain Likes from their own website.

Accoring to the documentation,

You will need to use the Facebook Graph API photo object by sending a HTTP request to photo_id/likes, where photo_id is the id of photo in question which you can also find from the photo link itself

https://www.facebook.com/photo.php?fbid=[photo_id]

You will also need to have the user grant publish_stream permissions.

You can try to use the Facebook Graph API explorer to try it, though I have not been able to get it working.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号