将视频上传到 iPhone 上 Objective-C 中的 Vimeo
我正在开发一个应用程序,我想将视频上传到 Vimeo、Facebook 和 YouTube。 Facebook 和 YouTube 有相当简单的 API,Vimeo 有很好的开发人员文档,但没有 Objective-C 框架。我见过几个使用 Vimeo 的应用程序,所以我想知道是否有某种我不知道的框架。
I am developing an app from which I want to upload Videos to Vimeo, Facebook and YouTube. Facebook and YouTube have pretty straightforward APIs, Vimeo has a good developer documentation, but no Objective-C framework. I have seen a couple of Apps which use Vimeo, so I was wondering if there is some kind of Framework out there I'm not aware of.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
好吧大家。如果您仍然对如何将视频上传到 vimeo 感兴趣,请参阅以下代码。首先,您需要向 vimeo 注册应用程序并获取您的秘密和消费者密钥。然后您需要从 Google 获取 GTMOAuth 框架,也可能需要 SBJson 框架。不幸的是,目前我没有时间清理下面的代码,但我认为对于那些需要 vimeo 帮助的人来说,这可能比没有好。本质上,您使用 vimeo 进行身份验证,获取上传票证,使用此票证上传视频,然后广告标题和一些文本。
下面的代码不能开箱即用,因为有几个视图元素相连,但它应该让您了解正在发生的情况。
OK everybody. If you're still interested in how to upload a video to vimeo, here's the code. First you need to register an App with vimeo and obtain your secret and consumer key. Then you need to get the GTMOAuth framework from Google and possibly the SBJson framework. At the moment I unfortunately don't have the time to clean up the below code, but I thought this may be better than nothing for those, who need some help with vimeo. Essentially you authenticate with vimeo, get an upload ticket, upload the video with this ticket and then ad a title and some text.
The code below won't work out of the box, because there are a couple of view elements connected, but it should give you an understanding of what is happening.
vimeo-Api 就足够了。仔细看看 vimeo-upload-api
该界面可以用任何语言使用能够发送网络数据。您必须创建一些
NSURLConnections
并且必须像示例中那样设置 HTTP-Body。The vimeo-Api is enough. Take a closer look to the vimeo-upload-api
The interface can be used in any language which is able to send network-data. You have to create some
NSURLConnections
and you have to set the HTTP-Body like in their examples.我为 Vimeo API 编写了 AFNetworking 客户端 - https://github.com/m1entus/RWMViemoClient
I wrote AFNetworking Client for Vimeo API - https://github.com/m1entus/RWMViemoClient