Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to implement GTMAppAuth for youtube video upload #96

Open
georgek1991 opened this issue Mar 5, 2020 · 0 comments
Open

How to implement GTMAppAuth for youtube video upload #96

georgek1991 opened this issue Mar 5, 2020 · 0 comments

Comments

@georgek1991
Copy link

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:<query goes here> 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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants
@georgek1991 and others