开发者

How to know if the user already like the page in Facebook Likebox?

I need to find a way开发者_如何学JAVA to know if the reader already liked my page. Is there a method in Facebook API to know this?


The like button handles this for you. It automatically toggles the state of the button depending on whether the user has already liked the page.

If you need this outside the use of the like button, then if your page is not of the type news article, then you should be able to look up whether the user has liked it by using a combination of the graph api and an FQL query to pull out the object id as defined in the documentation


Also, if you're working with an app in an iFrame, Facebook already passes in the signed_request ( https://developers.facebook.com/docs/authentication/signed_request/ ) a 'page' parameter which among other things lets you know if the current user already likes your page

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜