How to implement GTMAppAuth for youtube video upload
- Dominant language
- Swift
- Stars
- 448
- Forks
- 247
- Avg merge
- 2d 8h
- Merged PRs (30d)
- 5
Description
I am planning to move from GTMOAuth2 to GTMAppAuth.
In my iOS app I allow user to upload a video to youtube channel which I have already set from backend, that means user do not need to login in to their youtube account to upload the video, they can simply choose to upload the video and the video will be uploaded to my channel.
With GTMOAuth2 it was simple I was using the below code:
```
GTLRYouTubeService *youtubeService = [[GTLRYouTubeService alloc] init];
GTMOAuth2Authentication *auth;
auth = [[GTMOAuth2Authentication alloc] init];
auth.accessToken = accessToken;
auth.refreshToken = refreshToken;
auth.clientID = clientID;
auth.clientSecret = clientSecret;
auth.shouldAuthorizeAllRequests = YES;
youtubeService.authorizer = auth;
[youtubeService executeQuery: completionHandler:^(GTLRServiceTicket *ticket, GTLRYouTube_Video *insertedVideo, NSError *error) {
//youtube video upload completion
}];
```
Now I want to achieve this same behaviour with GTMAppAuth.
Is it possible to upload a video with GTMAppAuth to a particular youtube channel without user needing to login to their account? If yes how to go about it?
Contributor guide
Assessment
This issue has not been assessed yet.