我正在使用下面的代码发布在设备用户的墙上。我也设法得到朋友名单和他们的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];
}
这一点已经在这里找到答案:http://stackoverflow.com/questions/4126400/api-facebook- iphone,可能到后期至A-朋友墙 – Anton