How to find out if a user is a fan of a fan page

I am working on a FBML fan page for a client. I need to check to see if the current user is a fan of the page. I tried using the JavaScript API, but I found this to be incompatible with FBML.

I looked at the FBML page on the developer's wiki and found checks for just about everything else, but did not check the custom fan .

Any pointers in the right direction would be most significant.

Thanks in advance.

+4
source share
4 answers

Try this instead:

https://developers.facebook.com/docs/reference/fbml/visible-to-connection/

Please do not do this, however, the "Become 1st Fan" page. They are mostly spam.

+9
source

This is a good article - to perform this task on the tabs of the fan page (the easiest way is to create a static FBML application ).

http://thinkdiff.net/facebook/how-to-detect-fan-of-a-facebook-page/

Be sure to read the fine print - for example, if you are the administrator of the facebook page, you always see an element with a limited fan and an element with a limited fan.

+1
source

The best solution is to parse signed_request. User authorization is not required for this method.

$signed = parse_signed_request($_REQUEST['signed_request'], 'YOUR-APP-SECRET'); if ($signed['page']['liked'] == 1) { $fan = true; } else { $fan = false; } 

Here is a guide to verify that the user is a fan of Facebook.

0
source

Source: https://habr.com/ru/post/1302762/


All Articles