Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • Get Facebook permissions status in iPhone

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 191
    Comment on it

    After requesting facebook permissions we can check facebook permissions status using following code.

    [FBRequestConnection startWithGraphPath:@"/me/permissions" completionHandler:^(FBRequestConnection *connection,id user, NSError *error) {
        NSNumber *permInbox = [[[user valueForKey:@"data"] objectAtIndex:0]valueForKey:@"read_mailbox"];
        NSNumber *permEmail = [[[user valueForKey:@"data"] objectAtIndex:0]valueForKey:@"email"];
        NSNumber *permlocation = [[[user valueForKey:@"data"] objectAtIndex:0]valueForKey:@"user_location"];
        NSNumber *appInstalled = [[[user valueForKey:@"data"] objectAtIndex:0]valueForKey:@"installed"];
        if (permEmail ==[NSNumber numberWithInt:1]&& permInbox ==[NSNumber numberWithInt:1]&& permlocation ==[NSNumber numberWithInt:1]) {
    
            NSLog(@"%@",appInstalled);
                        // here proceed or check and print all permissions status
        }else
            // here code for request permission
    }];
    

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: