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.