ios sdk post pic to page wall as page
I've been struggling with this and something doesn't make sense:
NSDictionary *params = [NSDictionary dictionaryWithObject:message
forKey:@"message"];
NSString *graphPath = [NSString stringWithFormat:@"%@/feed%@",
currentID, currentToken];
[FBRequestConnection startWithGraphPath:graphPath
parameters:params
HTTPMethod:@"POST"
completionHandler:^(FBRequestConnection
*connection, id result, NSError *error) {}
This posts a message to a page wall as the page. But this does not work
right:
NSMutableDictionary* params = [[NSMutableDictionary alloc] init];
[params setObject:message forKey:@"message"];
[params setObject:imageForPosting forKey:@"picture"];
NSString *graphPath = [NSString stringWithFormat:@"%@/photos%@",
currentID, currentToken];
[FBRequestConnection startWithGraphPath:graphPath
parameters:params
HTTPMethod:@"POST"
completionHandler:^(FBRequestConnection
*connection, id result, NSError *error) {}
This posts a message and photo to a page but as the user not as the page.
Also, it doesn't post to the wall it goes into the "Posts by Others"
section. I cannot figure out why a message only works but a message with
photo does not. I am getting the access token for the actual page not for
the user. Hope somebody has some ideas about this thanks in advance!
rc
No comments:
Post a Comment