开发者

Integration with Facebook

I'm not quite sure I understand how to integrate Facebook into my website.

What I would like to do is allow users to sign in using their Facebook credentials.

The login is easy enough - but what I don't understand is the lifetime of the login. What I'm seeing is when I login through the popup, I get logged into Facebook as well. This isn't what I would expect.

Also, when I log out of Facebook, the Facebook cookie is deleted from my website as well.

Is this the expected behavior? It seems weird th开发者_如何学Goat if at some point in browsing my website the user logs out of Facebook they are logged out of my site as well.

I'm working with c# and asp.net if that matters.


As I understand, you just want to use Facebook as an easy way to log in. You're not pulling information from Facebook during the session with your app?

If that's the case, I'd keep my own authentication system but make it possible to use Facebook for logging in by claiming a user's user ID on Facebook. That way, as soon as they authenticate using Facebook you can get the user object by Facebook ID from your local data store, and use that to log in the user.

Your own (Forms) authentication system will then put your own cookies on the client for authentication, so as soon they log out of Facebook they'll remain logged in at your site.

Whenever you log in to Facebook as part of the Graph API flow, you remain logged in. And as soon as you log out, you're also logged out of your site. That is expected.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜