c# - How to recognize returning Facebook User using the Facebook Login Widget -


i implementing facebook login widget inside asp.net 4.5 c# web application. when clicked login button accesstoken. question regarding making user persistant in application.

there data associated specific facebook user. when user log off , log in (assuming cookie might deleted), want able recognize him again display relevant information.

i know need use database, best practice so. should use user id or email address unique user identification string?

i using mysql backend.

i have been working on similar application uses either facebook (oauth), google (openid) or manual registration login approach.

my prefered solution ask user email address, need request extended permissions on email field facebook not offered default.

http://developers.facebook.com/docs/authentication/permissions

my table structure looks this.

user   id (int)       email (nvarchar(256))   facebooktoken (nvarchar(256))   googletoken (nvarchar(256)) 

the advantage method able link users right account if decide later add authentication / identification service or roll own. won;t matter if login fb, google or twitter - know whcih account attach them to.

it useful have email address each of users regardless.

regards

steve


Comments

Popular posts from this blog

c# - Send Image in Json : 400 Bad request -

jquery - Fancybox - apply a function to several elements -

An easy way to program an Android keyboard layout app -