I have seen a few similar questions but I think this is new…
I am trying to add a popover on a blog that will contain a Facebook like button for a Facebook page and wil only show if the user does not already like the Facebook page.
Reading through the documentation this should be achievable with the Graph API pages.isFan method but does this require the user to give permissions? If so would it be possible to not have the app request permissions but rather fail gracefully?
Any help much appreciated.
You can tell if a user likes a page from the signed_request which is sent in the request from facebook. You don’t have to query the graph api.
We use c# and get it like so:
Then in the page
One more important thing as of the 30th March the page layout is changing to timeline and you should be aware of a bug currently that does not refresh the page upon liking it see this:
Does anyone know a fix for the lack of page refresh on facebook timeline pages when liking?
UPDATE
The php for decoding the signed request is: