我用SLComposeViewController共享圖像和URL的如下:我們可以使用SLComposeViewController在FB上共享視頻嗎?
SLComposeViewController *fbComposer =
[SLComposeViewController
composeViewControllerForServiceType:SLServiceTypeFacebook];
if([SLComposeViewController isAvailableForServiceType:SLServiceTypeFacebook])
{
SLComposeViewControllerCompletionHandler __block completionHandler=
^(SLComposeViewControllerResult result){
[fbComposer dismissViewControllerAnimated:YES completion:nil];
switch(result){
case SLComposeViewControllerResultCancelled:
default:
{
NSLog(@"Cancelled.....");
}
break;
case SLComposeViewControllerResultDone:
{
NSLog(@"Posted....");
UIAlertView * alert = [[UIAlertView alloc] initWithTitle:@"Sent"
message:nil
delegate:nil
cancelButtonTitle:@"Dismiss"
otherButtonTitles: nil];
[alert show];
}
break;
}};
NSString *[email protected]"posting to FB test";
[fbComposer setInitialText:message];
[fbComposer addImage:[UIImage imageNamed:@"2.jpg"]];
[fbComposer addURL:[NSURL URLWithString:@"http://www.youtube.com/watch?v=GoZ2Be2zLq8"]];
[fbComposer setCompletionHandler:completionHandler];
[self presentViewController:fbComposer animated:YES completion:nil];
}
我們能否也能使用SLComposeViewController共享視頻文件。 在此先感謝。
對不起,我已經實現了。我只想知道視頻共享是可以通過社交框架或不。 – Warewolf
好吧,但我認爲不是不可能... – Vishal
好的,謝謝你的回覆。 – Warewolf