UIActivityViewController - Upload Youtube Video - ios

I have a UIActivityViewController I'm using to share a video, I'm passing an NSString of text and a NSUrl that points to a local mp4 video file.
Sharing already works for email, message, photo album, etc. How can I upload my video to Youtube as well?
Apple does this in the default Photos and Camera app if you try it there. Can I do it in my app as well?

Apple only share some of the UIActivity that it uses in it's applications. That's likely because some are part of iOS while other are parts of the applications (different teams).
OTOH it's quite easy to add your own UIActivity to your application, e.g. see my AirPlay UIActivity that comes with a sample.
So if you can find a .NET YouTube client library then you should only need a bit of glue to connect them.

Unfortunately, as per UIActivity class reference it is not included in iOS 6 (well, at least not in the public API).
You'll probably have to create your own UIActivity (just like here) and implement the youtube upload yourself.
Or hopefully there is a ready-made library that does so.

Related

Application that plays videos from the video library

I would like to create a simple app that does some video playback (with a few extra controls) of videos that you would find in the videos app. I've been searching and searching for a way to access the videos but I haven't found a single API that plays from the videos app.
Every solution I find plays videos from the photos app. I have apps that access the videos library on my iPad/iPhone so I'm assuming it's possible. Does anyone have the api for this?
Apps cannot access data from other applications on iOS, you cannot access the data of other apps unless it's made available by the app via a web server etc.
Your best bet is to use UIImagePicker to load the videos and images that are on your phone.
You can check out a reference here.
As for getting the videos off the videos app, that's not really possible (as far as I know), but you are able to show just photos or just videos with UIImagePicker using the mediaTypes property.

How do I upload video in a tweet in an iOS app using XCode

I am new to iOS development and need to make a change to an iOS app I'm taking over to add video to a tweet. My current app UI allows the user to type in text for a tweet but I would be changing that to allow them to pick a video to upload along with the tweet similar to how the Twitter app works.
I see the Twitter API supports uploading video but I haven't been able to find any good examples on how to accomplish this using XCode and Objective-C. Any recommended approaches or tool kits I can leverage to accomplish this?
https://dev.twitter.com/rest/public/uploading-media
I had to roll my own solution. Check out my project https://github.com/mtrung/TwitterVideoUpload.
Light-weight due to using built-in Apple's Social framework to keep things light. No need to add extra frameworks such as TwitterKit and Fabric.
Support chunk upload.
Built-in support for user's credential retrieval
Thanks for the -1 that was helpful. So thought I found the answer with Fabric (https://get.fabric.io/). The Android side supports image and video upload with a tweet but the iOS side does not (image only). It looks like you have to roll your own solution including building a video picker. Then you can use the Twitter REST API to upload the video. Not exactly what I was hoping for but it is doable.
This link shows Objective C and Swift code to do the video upload Share video on Twitter with Fabric API without composer iOS.

Record Video and sharing it in ios app

In my app I want to give the user the option to record a video and share it. What is the easiest way to achieve this? (I have been trying to add video recording for days now and keep hitting dead ends). Can anyone offer some help?
To allow functionality to record videos within your app, please go to the Apple documentation for UIImagePickerController for taking pictures and movies
UIImagePickerController Class Reference Link
Once you have your video, sharing it is a little more difficult as unlike text or images, the movie file sizes can often be very large and may have to rule out simple sharing via email, text-message etc.
The best way to share in this case, would be to connect to an external API, like YouTube, where you can upload the video from the app. Here's a link to YouTube documentation for this
YouTube API Documentation Link
I suggest these as good places to start, as this is what you are asking for.
Hope this helps

Video upload with Instagram API now allowed?

According to the Instagram documentation, Instagram only allows API uploads for images (JPG, PNG).
A new iPhone app called Cinamatic allows users to upload videos to Instagram after loging in to the Instagram via Cinamatic.
Is video upload via the Instagram API now allowed? There is no mention on the public documentation.
According to this there might be the option for a white list of developers with access to the video uploads via the API. Any ideas?
At this time, uploading via the API is not possible.
following reasons:
Instagram is about your life on the go – we hope to encourage photos from within the app.
We want to fight spam & low quality photos.
Once we allow uploading from other sources, it's harder to control what comes into the Instagram ecosystem. All this being said, we're working on ways to ensure users have a consistent and high-quality experience on our platform.
http://instagram.com/developer/endpoints/media/
I also check this link.
Posting video on instagram using hooks
It also doesn't work properly for me.

How to upload video to Vine programmatically on iOS?

What I can find online is all about retrieving information from Vine (through undocumented APIs). How can I upload the video in my app to Vine programmatically?
I just found this app can do this on the app store:
https://itunes.apple.com/us/app/vinyet/id697065371
"For the first time, capture, enhance, and post your videos DIRECTLY to Vine or Instagram."
I found this: https://github.com/VineAPI/VineAPI/blob/master/endpoints.md
You need to use these requests: Login, Upload thumbnail, Upload video, Create post.
I don't know if it works or not, you have to try.
In any case, the use of undocumented (private) API can lead to bad consequences.

Resources