开发者

Twitter and Facebook on iPhone - save sessions across app launches?

开发者 https://www.devze.com 2023-01-03 13:51 出处:网络
I am using OAuth for twitter and fb-connect for facebook authentication in my iPhone app. Is it possible to save the user sessions across app launches?

I am using OAuth for twitter and fb-connect for facebook authentication in my iPhone app. Is it possible to save the user sessions across app launches?

i.e. if the user logs in once, the next time they launch the app, we log them in automatically from some state saved the last time the app closed?

For Twitter would it work if I just save the auth_token and use it every time the user wants to use twitter from my app? Or do I need to do anything else? I could not get it to work 开发者_JAVA百科like that so wondering if I was doing something wrong.

Thanks.


For Twitter you will need to save the access_token. This is unique to the user/application and when saved will let you act as the users for future requests. It will consist of two strings one of which will start with the user's id.

0

精彩评论

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