tags:

views:

2043

answers:

4

Hi,

I'm working on a FBML fan page for a client. I need to perform a check to see if the current user is a fan of the page. I tried using the JavaScript API but I've found this is not compatible with FBML.

I have looked through the FBML page on the developer wiki and found checks for practically everything else but no is user fan check.

Any pointers in the right direction would be most appreciated.

Thanks in advance.

+1  A: 

Try this page:

http://wiki.developers.facebook.com/index.php/Pages.isFan

iolo
Cheers but this is a call to the FB JavaScript API which you can't do in static FBML pages. This was my first approach.
Dominic Godin
This is not the javascript API. This is a command for the REST API (http://wiki.developers.facebook.com/index.php/API). Your server will need to call this through the REST API.
Gdeglin
+4  A: 

Try this instead:

http://wiki.developers.facebook.com/index.php/Fb:visible-to-connection

Please don't make those "Become a fan 1st" pages with it though. They're basically spam.

iolo
they're actually allowed in the terms and conditions : see 4.2 http://www.facebook.com/promotions_guidelines.php
Simon_Weaver
Facebook's guidelines aren't always in a user's best interests.
iolo
example of such a page : facebook.com/deltaco - then click on the Free Taco tab (active as of today)
Simon_Weaver
A: 

This is a good article - for doing this task in fan page tabs (most easily done with the static FBML app).

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

Be sure to read the fine print - such as if you’re admin of facebook page, you all time see the fan restricted item and non fan restricted item.

Simon_Weaver
A: 

Hey I've recently written a script to exactly this, check if a user is a fan or not. The script uses pretty basic php and all the files/documentation needed are included in the zip.

If you wanna use this script, you can download it at: http://adf.ly/6yMN.

Shaggy

related questions