开发者

Facebook Auth on iOS

iOS beginner here. I am implementing SSO in my iOS app. I've created a Facebook object with

Facebook* faceboo开发者_如何学运维k = [[Facebook alloc] initWithAppId:appId];
[facebook authorize:permissions delegate:self];

How do I stay logged in after the user closes the app? Do I persist this facebook object in Core Data?


You can also use NSUserDefaults, which is what I have used in the past. You only need to persist the expirationDate and accessToken. Once you restore those into the Facebook object on launch, you can call isSessionValid to determine that validity of both those properties.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜