I am using facebook SDK for iOS in my app.
-(IBAction)FacebookLogin:(id)sender{
if (FBSession.activeSession.isOpen) {
[self promptUserWithAccountNameForStatusUpdate];
}
else {
NSArray *permissions = [[NSArray alloc] initWithObjects: @"publish_stream",@"email",nil];
[FBSession openActiveSessionWithPermissions:permissions
allowLoginUI:YES
completionHandler:^(FBSession *session,
FBSessionState status,
NSError *error) {
if (error) {
} else if (FB_ISSESSIONOPENWITHSTATE(status)) {
[[FBRequest requestForMe] startWithCompletionHandler:
^(FBRequestConnection *connection, NSDictionary<FBGraphUser> *user, NSError *error) {
if (!error) {
[self promptUserWithAccountNameForStatusUpdate];
}
}];
}
}];
}
}
-(void)promptUserWithAccountNameForStatusUpdate {
[[FBRequest requestForMe] startWithCompletionHandler:
^(FBRequestConnection *connection, NSDictionary<FBGraphUser> *user, NSError *error) {
if (!error) {
}
}];
}
How can I fetch profile photos of user ? I want to fetch his previous 4 profile photos also. Just like in the app Tinder.
How to do this ?