Reputation: 10121
In one of our app, our user already logged in using the iOS FB SDK
, and in one page is am displaying the comment box social plugin
to render comments, but seems it can't use the existing logged session.
Are there any steps required so user don't need to double login?
Upvotes: 0
Views: 724
Reputation: 76
Comments box social plugin is not designed for iOS. But we can make it work by restricting the user to sign into FB only using WebView popup. To achieve this, set NO for both authorizeWithFBAppAuth and safariAuth in - (void)authorize:(NSArray *)permissions; method of Facebook.m
- (void)authorize:(NSArray *)permissions {
self.permissions = permissions;
[self authorizeWithFBAppAuth:NO safariAuth:NO];
}
This will store all the facebook credentials in sharedHTTPCookieStorage. Now when you load your comments box social plugin using webview, it will recognize the existing session.
Upvotes: 1