We have a website wherein a user can post information from our website to their facebook wall. I am using Facebook graph api’s streampublish to accomplish this task.
So, the flow works like this:
a. User clicks the ‘Post this link to Facebook’ button
b. if the user is not logged into facebook, a login popup box is automatically shown.
c. After successful login, the user is shown ‘Post to Wall’ popup box.
d. User posts message to the wall.
All of the above works fine. However my requirement is, after publishing the stream data I need to get the users email, firstname and lastname based on their facebook login and save it to our database. Does any one have any advice on how to get these information?
The website is built using Javascript, ASP.Net and C#
Edit:
Thanks for the response.
I am currently using the below syntax to post to a wall
FB.ui( { method: ‘stream.publish’,
message: userMessage1,
attachment: attachment1,
action_links: actionLinks1,
user_message_prompt: messagePrompt1,
target_id: targetId1,
actor_id: actorId1 },FBresponse);
Can I get the user object details via the FBresponse call back function? At the moment when I use Firebug, the response object contains only the post_id property
If you’ve got permission to publish on the user’s wall, you should have a valid access token for that use. You can just query the Facebook Graph API
/meobject to get that information.