so i did a web app with php facebook sdk and run it on my localhost... everything seems to be fine, the function GetUser got me the user id... then when i upload the web to the a host server GetUser() return always 0... is somebody figure it out?
this is my code, nothing special:
$homeurl = 'http://postmaster.net78.net/MainMenu.php'; //return to home
$fbPermissions = 'user_events,friends_events,read_stream,publish_stream,offline_access';
$facebook = new Facebook(array(
'appId' => '****',
'secret' => '***',
));
$user = $facebook->getUser();
echo $user;
if ($user)
{
.......
}
else
{
$_fb['loginurl'] = $facebook->getLoginUrl(array('redirect_uri'=>$homeurl,'scope' => $fbPermissions));
$_fb['authed'] = false;
echo '<center><br><br><br><br><br><br><br>For start working with <img src="images/logoBlack.gif" height = "8%" width="15%"> <br>you must connect to your facebook account<br>';
echo '<a href="'.$_fb['loginurl'].'"><img src="images/loginwithfacebook.jpg"></a>';
}
and my developer info: http://img838.imageshack.us/img838/7051/ef7n.png
thanks for the helpers