I am trying to display photos from the user from Facebook in Objective-C:
Currently, I send an FQL request, retrieve the "src" link and then load this link into a UIWebView.
My question is: is there a better way to display photos from facebook? (UIImageView maybe?)
Just to keep in mind - My goal is to create an app where the thumbnails of each photo is shown, pressing on each photo will make it full screen and users will be able to swipe between enlarged photos (exactly how it is now on the facebook app)
Here is my code to display the first photo (this was just a test)
[FBRequestConnection startWithGraphPath:@"/fql"
parameters:queryParam
HTTPMethod:@"GET"
completionHandler:^(FBRequestConnection *connection,
id result,
NSError *error) {
if (error) {
NSLog(@"Error: %@", [error localizedDescription]);
} else {
NSMutableArray *facebookData = [result valueForKey:@"data"];
NSDictionary *firstPhotoDictionary = [testArray objectAtIndex:0];
//Now i load the link into the UIWebView
NSString *fullURL = [testpick valueForKey:@"src"];
NSURL *url = [NSURL URLWithString:fullURL];
NSURLRequest *requestObj = [NSURLRequest requestWithURL:url];
[_imageWebView loadRequest:requestObj];
}
}];