所有早些时候我使用下面的代码发布朋友墙,它工作得很好。
NSMutableDictionary *postVariablesDictionary = [[NSMutableDictionary alloc] init];
[postVariablesDictionary setObject:@"Please download Hollywood Burger <https://itunes.apple.com/in/app/doodlify/id578182515>" forKey:@"message"];
[FBRequestConnection startWithGraphPath:[NSString stringWithFormat:@"%@/feed",[selectedFBfriendsArray objectAtIndex:i] ] parameters:postVariablesDictionary HTTPMethod:@"POST" completionHandler:^(FBRequestConnection *connection, id result, NSError *error) {
NSLog(@"result is %@",result);
NSLog(@"error is %@",[error description]);
}
但Facebook不赞成使用Graph API在朋友墙上发帖 参考此链接
我可以使用Feed对话发布朋友墙
> NSMutableDictionary* params = [NSMutableDictionary dictionaryWithObjectsAndKeys:
> @"401253773268767", @"app_id",
> @"Reference Documentation", @"caption",
> @"Using Dialogs to interact with users.", @"description",
> @"1821531148",@"to",
> nil];
> [self.facebook dialog:@"feed" andParams:params andDelegate:self];
但是,我需要在选定的朋友(多个朋友)墙上张贴帖子。
请你帮我一个人......
提前致谢。