我正在使用下面的代碼發佈在設備用戶的牆上。我也設法得到朋友名單和他們的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