我正在使用以下代码在设备用户的墙上发布。我也设法获得了朋友列表和他们的 ID。使用朋友的 id 如何根据朋友的 id 使用以下代码在选定的朋友的墙上发帖?
if([SLComposeViewController isAvailableForServiceType:SLServiceTypeFacebook]) {
SLComposeViewController *controller = [SLComposeViewController composeViewControllerForServiceType:SLServiceTypeFacebook ];
SLComposeViewControllerCompletionHandler myBlock = ^(SLComposeViewControllerResult result) {
if (result == SLComposeViewControllerResultCancelled) {
NSLog(@"Cancelled");
} else {
UIAlertView *alert = [[UIAlertView alloc]initWithTitle:@"Posted!!!"
message:@"your status is posted to facebook successfully" delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:nil];
[alert show];
}
[controller dismissViewControllerAnimated:YES completion:Nil];
};
controller.completionHandler =myBlock;
[controller setInitialText:@" hello there you got a text ..."];
[self presentViewController:controller animated:YES completion:Nil];
}