0

I want to retrieve all my photo album from my Facebook account. I follow Graph API also and using latest Facebook API.

My code is like this:

 -(IBAction)getgallery:(id)sender
 {
   FBRequest *request = [FBRequest requestForGraphPath:@"me/albums"];
   [request startWithCompletionHandler:^(FBRequestConnection *connection, NSDictionary <FBGraphUser> *my, NSError *error) {
    if ([my[@"data"]count]) {
        for (FBGraphObject *obj in my[@"data"]) {
            FBRequest *r = [FBRequest requestForGraphPath:[NSString stringWithFormat:@"/%@/photos", obj[@"id"]]];
            [r startWithCompletionHandler:^(FBRequestConnection *c, NSDictionary <FBGraphUser> *m, NSError *err) {
                //here you will get pictures for each album
            }];
          }
        }
    }];
 }

I follow this link. But can't understanding properly. Please anyone can help me?

Nothing is happening when i press the getgallery button.

Community
  • 1
  • 1
Soumya Ranjan
  • 4,817
  • 2
  • 26
  • 51

0 Answers0