I am using facebook PHP SDK. I need the user to login to my site using their facebook account and I need to store their email, first name and last name in my database. I am using this code to login the user
$loginUrl = $facebook->getLoginUrl(
array(
'scope' => 'user_photos,user_videos,email,offline_access,publish_stream,user_birthday,user_location,user_work_history,user_about_me,user_hometown',
'redirect_uri' => $fbconfig['baseurl']
)
);
My problem is how can I retrieve the information after the user login and rediret back to my site.
Something along the lines of..
OR
This will return an array that includes all the public information that FB generally gives out. (i.e.- name, birthday, email, etc.)
Now I’m sure you can access the user’s email as such,
To check out everything it returns specifically,
For more example code, check out Facebook’s PHP SDK