如何从IOS应用程序在好友墙上发布Facebook提要?
如何从IOS应用程序在好友墙上发布Facebook订阅源?如何从IOS应用程序在好友墙上发布Facebook提要?,ios,facebook,facebook-graph-api,Ios,Facebook,Facebook Graph Api,如何从IOS应用程序在好友墙上发布Facebook订阅源? 社交框架对于分享和发布非常有用 Fb,Twitter 在对话框中,它将要求隐私,我们可以将其设置为friends/Piblic/Me if ([SLComposeViewController isAvailableForServiceType:SLServiceTypeFacebook]) { // Initialize Compose View Controller SLComposeViewControlle
- 社交框架对于分享和发布非常有用 Fb,Twitter
- 在对话框中,它将要求隐私,我们可以将其设置为friends/Piblic/Me
if ([SLComposeViewController isAvailableForServiceType:SLServiceTypeFacebook]) { // Initialize Compose View Controller SLComposeViewController *vc = nil; vc = [SLComposeViewController composeViewControllerForServiceType:SLServiceTypeFacebook]; // Configure Compose View Controller [vc setInitialText:self.captionTextField.text]; [vc addImage:self.image]; [vc setCompletionHandler:^(SLComposeViewControllerResult result){ if (result == SLComposeViewControllerResultDone) { [[[UIAlertView alloc] initWithTitle:@"Congratulations" message:@"Your post is successfully Posted" delegate:self cancelButtonTitle:@"OK" otherButtonTitles:nil] show]; }else{ } }]; // Present Compose View Controller [self presentViewController:vc animated:YES completion:nil]; } else { NSString *message = @"It seems that we cannot talk to Facebook at the moment or you have not yet added your Facebook account to this device. Go to the Settings application to add your Facebook account to this device."; UIAlertView *alertView = [[UIAlertView alloc] initWithTitle:@"Oops" message:message delegate:self cancelButtonTitle:@"OK" otherButtonTitles:nil]; [alertView show]; }
NSMutableDictionary *params =
[NSMutableDictionary dictionaryWithObjectsAndKeys:
@"An example parameter", @"description",
@"https://developers.facebook.com/ios", @"link",
nil];
[FBWebDialogs presentFeedDialogModallyWithSession:nil
parameters:params
handler:^(FBWebDialogResult result, NSURL *resultURL, NSError *error) {}
];
查看更多详细信息和可用参数列表。官方网站是一个很好的起点。当你需要为你所面临的问题提供一个具体的问题时,你不应该仅仅要求实现一个规范。