objective c - Facebook Graph Api call not working for iOS -
for ios app, using facebook sdk need fetch photos user's album need fetch them in single request info albums , containing photos @ same time, tried
/me/albums?fields=count,name,photos.limit(10){images}
that api call working fine in graph api explorer not on ios platform. need images field of photos why using above api call
if run api runs fine
/me/albums?fields=count,name,photos.limit(10)
only {images} part causing problem, error message of unsupported url, have acquired permissions user_photos
code :
fbsdkgraphrequest *request = [[fbsdkgraphrequest alloc] initwithgraphpath:@"/me/albums?fields=count,name,photos.limit(10){images}" parameters:nil httpmethod:@"get"]; fbsdkgraphrequestconnection *connection = [[fbsdkgraphrequestconnection alloc] init]; [connection addrequest:request completionhandler:^(fbsdkgraphrequestconnection *connection, id result, nserror *error) { if(!error) { nslog(@"result %@",result); } else { nslog(@"error description : %@",error.description); } }]; [connection start];
i making final url call adding/removing fields graph api explorer side pane, request call generating was
/me/albums?fields=count,name,photos.limit(10){images}
not working on ios platform, if use syntax instead
/me/albums?fields=count,name,photos.limit(10).fields(images)
to address fields of photos works fine, got inspiration answer posted here
Comments
Post a Comment