I am stuck with getting picture from Facebook Graph API for news feed with small size. This is the url I get https://fbcdn-photos-b-a.akamaihd.net/hphotos-ak-xpf1/t1.0-0/10363492_10202184985725870_7374705736674502849_s.jpg. Not sure how will get the picture with size o.jpg
1
votes
1 Answers
0
votes
Finally, figured it out. Here is what I did.
NSString *query = [NSString stringWithFormat:@"SELECT pid, object_id, src_big, src_big_width, src_big_height FROM photo WHERE object_id = %@", wallPost[@"object_id"]]; //begins from SELECT........
NSMutableDictionary * params = [NSMutableDictionary dictionaryWithObjectsAndKeys:
query, @"q",
nil];
[FBRequestConnection startWithGraphPath:@"/fql" parameters:params HTTPMethod:@"GET" completionHandler:^(FBRequestConnection *connection, id result, NSError *error) { //do your stuff if (!error) { NSArray *photo = [result objectForKey:@"data"];
NSString *photoString = [[photo valueForKey:@"src_big"]componentsJoinedByString:@""];
//NSLog(@"result %@ %@", photoString);
}
}];