![](/img/trans.png)
[英]Post multiple images using SLComposeViewController on Facebook/ Twitter?
[英]How to post multiple images using SLComposeViewController on Facebook and Twitter in same album
我是iOS / Objective-c的新手。 我正在開發一個可以在Facebook和Twitter上共享多個圖像的應用程序。 我已經找到了代碼,但是當我在Facebook上使用該代碼/下面的代碼時,所有圖像都作為單獨的帖子發布。
SLComposeViewController *composeViewController = [SLComposeViewController composeViewControllerForServiceType:SLServiceTypeFacebook];
if (composeViewController)
{
for (int i=0; i<images.count; i++)
{
[composeViewController addImage:[images objectAtIndex:i]];
}
[composeViewController setCompletionHandler:^(SLComposeViewControllerResult result)
{
if (result == SLComposeViewControllerResultDone)
{
//NSLog(@"Posted");
UIAlertView *alert = [[UIAlertView alloc]initWithTitle:@"Successful" message:@"Image successfully posted." delegate:self cancelButtonTitle:@"Ok" otherButtonTitles:nil, nil];
[alert show];
}
else if (result == SLComposeViewControllerResultCancelled)
{
//NSLog(@"Post Cancelled");
}
else
{
//NSLog(@"Post Failed");
}
}];
[self presentViewController:composeViewController animated:YES completion:nil];
}
所以我想知道如何發布多個圖像,是否可以在單個推文或單個相冊中發布多個圖像? 提前致謝。
不可能SLComposeViewController使用FBRequestConnection要好得多。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.