Hello,
I've managed to post a picture to an user's wall with this code:
Code:
NSString *imageName = [NSString stringWithFormat:@"%@", [[party.partyPictures allKeys] objectAtIndex:pageControl.currentPage]];
NSString *imageUrlString = [NSString stringWithFormat:@"%@images/%@/%@", WebServiceAddress, party.partyID, imageName];
NSMutableDictionary* params = [NSMutableDictionary dictionaryWithObjectsAndKeys:
APP_NAME,@"message",
[NSString stringWithFormat:@"%@ is great!", party.partyName], @"name",
AppURL, @"link",
imageUrlString, @"picture",
nil];
[[self appDelegate].facebook requestWithGraphPath:@"me/feed" andParams:params andHttpMethod:@"POST" andDelegate:self];
I've tried to post a photo to an Event wall, with the same code, except that requestWithGraphPath is not the same:
Code:
...
[[self appDelegate].facebook requestWithGraphPath:@"EVENT_ID/feed" andParams:params andHttpMethod:@"POST" andDelegate:self];
Post is posted on user's wall. @"message" parameter is there but only picture that is shown is a user profile picture and not picture from URL, like in the previous code snippet. I've looked at the documentation and it says in Connections section, that Event has "feed" connection and I thought, since it accepts Post object that this would be OK, but no.
Has anyone manage to do this?