I am trying to get facebook userid of the users currently logged in. I used this below piece of code ang got error "Uncaught OAuthException: An active access token must be used to query information about the current user"
require '../src/facebook.php';
$facebook = new Facebook(array(
'appId' => '226668060741665',
'secret' => 'secret key',
));
$rr=$facebook->getAccessToken();
$params = array(
'access_token' => $rr,
'installed' => 'true',
'permissions' => 'read_stream,publish_stream'
);
$eded=$facebook->api("/me/", "GET", $params);
I tried to use Facebook::getLoginStatusUrl() but didnt get what it return.
If i can use above function, please tell me how to get id of current logged in user and How can I use return value of Facebook::getLoginStatusUrl()
Thanks in advance