We have a user login that I wrote for our site sourcecodedb.com, and without any changes in our code, the Facebook subscription stopped working on April 15, 2012, our twitter api is also very slow, but this is another problem. This page users are sent when they click on the login button.
<?php require_once('fbsdk/facebook.php'); $facebook = new Facebook(array( 'appId' => 'xxx', 'secret' => 'xxx', )); $params = array('scope' => 'read_stream, email', 'redirect_uri' => 'http://sourcecodedb.com/loggedin.php');
And then the page that processes the login looks something like this: I extracted some of the code.
<?php include_once('header.php'); require_once('fbsdk/facebook.php'); $facebook = new Facebook(array( 'appId' => 'xxx', 'secret' => 'xxx', )); $fbuid = $facebook->getUser(); //Detta tar facebook användarens id från en aktiv session echo 'fbid: '.$fbuid.'</br>'; if($fbuid) { $user_profile = $facebook->api('/me','GET'); $name = $user_profile['first_name']; $lname = $user_profile['last_name']; $fbid = $user_profile['id']; }
This has been added for debugging and always returns 0
echo 'fbid: '.$fbuid.'</br>';
Any help is appreciated!
source share