Facebook Graph Api
Hopefully someone out there can help. Spent the last 12 days on this...In my app I can:
1) Log into Facebook with this:[facebook authorize:permissions];
where my permissions are read_stream,publish_stream,user_photos.
2) Access my profile with this:[facebook requestWithGraphPath:@"me" andDelegate:self];
All my account info is returned successfully.
3) Successfully Upload a photo (and receive the returned photo ID) with this:
NSMutableDictionary *params = [NSMutableDictionary dictionaryWithObjectsAndKeys:projectPhoto.image, @"picture",@"privacy",@"EVERYONE",nil];
[facebook requestWithGraphPath:@"me/photos" andParams:params andHttpMethod:@"POST" andDelegate:self];
Now that I have the ID of the uploaded photo (which, the photo by the way, uploaded to an album created for my app automatically) I want to find out the URL of the photo so I can use it in a feed post later in the app. So here's what I call next:
NSMutableDictionary *params = [NSMutableDictionary dictionaryWithObjectsAndKeys:@"id",[result objectForKey:@"id"],nil];
(for testing purposes, I don't use this result variable...I actually type the ID like this @"123456789123456789132" instead...just to be sure)
[facebook requestWithGraphPath:@"me/photos" andParams:params andHttpMethod:@"GET" andDelegate:self];
The result is:
Result of API call: { data = ( ); }
Here's the strange part. When I log into my Facebook account and tag the uploaded photo as me being in it, this last query works and returns the URL I'm looking for.
Please help if you can! Thank you!
|