2014-07-09

I'm using graph API for getting details of facebook user.

I'm retrieving profile picture using https://graph.facebook.com/697720953609596/picture.
Here 697720953609596 is user id which I got by using php SDK in my website.

I'm retrieving my profile details using https://graph.facebook.com/100001150925978.
100001150925978 is profile id which I got from my profile url.

But i want to retrieve my profile details using user id 697720953609596 which I get using SDK.
Is there any way to do that?

My code is

));
$access_token = $facebook->getAccessToken();

$user = $facebook->getUser();

I'm storing $user(in above case 697720953609596) in database in order to create his account in my website. And later on i want to show him his facebook details on his profile.

Showing his profile picture is fine with graph.facebook.com/697720953609596/picture. But problem is how to show him his first name and last name using 697720953609596 id.

Show more