通过iOS App在Twitter上分享视频 [英] Share videos on Twitter via iOS App
本文介绍了通过iOS App在Twitter上分享视频的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
是否可以使用SLRequest分享视频?
Is it possible to share a video using SLRequest ?
我可以使用相同的方式分享图片
I'm able to share Images using the same
SLRequest *postRequest = [SLRequest requestForServiceType:SLServiceTypeTwitter requestMethod:SLRequestMethodPOST URL:requestURL parameters:message];
if (isImage)
{
NSData *data = UIImagePNGRepresentation(imgSelected);
[postRequest addMultipartData:data withName:@"media" type:@"image/png" filename:@"TestImage.png"];
}
postRequest.account = account;
[postRequest performRequestWithHandler:^(NSData *responseData, NSHTTPURLResponse *urlResponse, NSError *error)
{
if (!error)
{
NSLog(@"Upload Sucess !");
}
}];
推荐答案
我知道如何将视频上传到twitter使用新的API。我已经尝试过,它有效。
I know how to upload video to twitter use the new API. And I have tried it, it works.
请检查: https://github.com/liu044100/SocialVideoHelper
您只需要调用此类方法。
You just need to call this class method.
+(void)uploadTwitterVideo:(NSData*)videoData account:(ACAccount*)account withCompletion:(dispatch_block_t)completion;
希望它可以解决您的问题。
Hope it can resolve your problem.
最好的问候。
这篇关于通过iOS App在Twitter上分享视频的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文