以前は、友人の壁を投稿するために以下のコードを使用していましたが、うまくいきました。
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 を使用したフレンド ウォールへの投稿を非推奨にしました。このリンクを参照してください。
フィード ダイアログを使用してフレンド ウォールを投稿できます
> 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];
しかし、選択した友達 (複数の友達) の壁に投稿する必要があります。
誰か助けてくれませんか..
前もって感謝します。