开发者

Integrating Facebook, but where's the best place to store variables like login status?

开发者 https://www.devze.com 2023-03-10 03:53 出处:网络
I have integrated Facebook into my site, but where is the best plac开发者_如何学Ce to store things like current login status? For example,

I have integrated Facebook into my site, but where is the best plac开发者_如何学Ce to store things like current login status? For example,

window.fbAsyncInit = function() {
    DS.fb.sdk.init();
    DS.fb.user.login();
}

gets the login status of the user, but do I save this status into cookies/databases or is there a more efficient way of saving it? If it's any help, I also want to store a lot of other things like current location etc.

Also, as a side question, are there good example links of sites that have Facebook integrated and show how they integrate Facebook and store data of the user?


Sessions are always very good to use. You can use information into session variables rather than storing them in database then extracting again from database.

0

精彩评论

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

关注公众号