Facebook API - How to check in application for fans?

trax69

New Member
I try to create an facebook application.I created a new application and downloaded the framework.In my index.php i do the following:\[code\]<?phprequire_once 'facebook.php';$appapikey = '123456...xyz';$appsecret = '123456...xyz';$facebook = new Facebook($appapikey, $appsecret);$user_id = $facebook->require_login();$pageid = "123456...xyz";$isfan = $facebook->api_client->pages_isFan($pageid);if($isfan) echo '<iframe src="http://www.google.com/" width="720" height="1250" frameborder="0"></iframe>';else echo 'you have to become a fan!';\[/code\]Without $isfan, it shows me the correct output. But with this question, I always see the else statement (also when I am a fan).Any ideas? Maybe my $pageid is not correct. I showed on my page (e.g. http://www.facebook.com/pages/Microsoft/107785359249238?ref=ts ) and used 107785359249238 as pageid. Is that right?
 
Back
Top