I'm using FBSDKLoginButton
to allow to user login using Facebook
and using FBSDKLoginButton.readPermissions = @[@"public_profile",@"email",@"user_likes",@"email",@"user_birthday"];
to ask for permissions , but I need one more permission which is publish_actions I should use FBSDKLoginManager
with
logInWithReadPermissions:@[@"public_profile",@"user_likes",@"user_birthday"]
logInWithPublishPermissions:@[@"publish_actions"]
but this for some reason affect on my permission "some of my permission are missing check image
Code:-
FBSDKLoginManager *login = [[FBSDKLoginManager alloc] init];
[login logInWithPublishPermissions:@[@"publish_actions"] handler:^(FBSDKLoginManagerLoginResult *result, NSError *error) {
if (error) {
// Process error
} else if (result.isCancelled) {
// Handle cancellations
} else {
// If you ask for multiple permissions at once, you
// should check if specific permissions missing
if ([result.grantedPermissions containsObject:@"publish_actions"]) {
// Do work
}
}
}];
[login logInWithReadPermissions:@[@"public_profile",@"",@"user_likes",@"user_birthday"] handler:^(FBSDKLoginManagerLoginResult *result, NSError *error) {
if (error) {
// Process error
} else if (result.isCancelled) {
// Handle cancellations
} else {
// If you ask for multiple permissions at once, you
// should check if specific permissions missing
if ([result.grantedPermissions containsObject:@"email"]) {
// Do work
}
}
}];
Result:-
**it take long time to redirect the user to the permission view ? and not all my permission appear to user **
Note:- I know that warning mean that i need to submit my app to review but this not what i'm asking about right now .
Aucun commentaire:
Enregistrer un commentaire