I am working on an iOS app which uses Quickblox SDK for chatting purpose. Also used Facebook SDK for login purpose. When used facebook login, quickblox uses loginWithSocialProvider method to login using facebook which always returns error. With Facebook api version upto 2.3 I'm able to create account and able to get successful response. But Facebook api version 2.4 and above I'm getting error response even with latest quickblox sdk 2.5 and FB SDK 4.6.0. Please help me figure out why this is happening. Please advice.
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
Double check your facebook token permissions, it should return correct email address in order to 'loginWithSocialProvider' work. Also please check that you are using this method in a correct way:
[QBRequest logInWithSocialProvider:@"facebook" accessToken:[[FBSDKAccessToken currentAccessToken] tokenString] accessTokenSecret:nil successBlock:^(QBResponse * _Nonnull response, QBUUser * _Nullable user) {
//
NSLog(@"Logged in as %@", [user description]);
} errorBlock:^(QBResponse * _Nonnull response) {
//
NSLog(@"Error: %@", [response.error description]);
}];