0

I am making a hybrid application by AngularJs/Cordova that can interact with youtube but now i have some problem with Youtube Api v3 and that is login with youtube by gmail. I have tried to redirect my application to google login page with this code:

   var logged = VideosService.getGoogleLogged();
        if (logged == false) {
            cordova.InAppBrowser.open('https://accounts.google.com/o/oauth2/auth?client_id=' + $rootScope.googleClientId + '&redirect_uri=http%3A%2F%2Flocalhost%2Foauth2callback&scope=https://www.googleapis.com/auth/youtube&response_type=token', '_top', 'location=yes');
        } else {
            alert('not logged in');
        }

But when i successfully logged in the api I do not know how to return to my application and save the access token to my application. Can you point me out this problem?, i have searched 3 days but no luck to me.

Thank you.

MrUpsidown
  • 21,592
  • 15
  • 77
  • 131
duong khang
  • 342
  • 1
  • 4
  • 19
  • take a look this [Youtube Login using AngularJS](http://stackoverflow.com/questions/25775656/how-to-use-api-key-with-youtube-in-angularjs-and-list-videos-in-a-playlist) – Banik Mar 01 '16 at 13:35
  • @Banik i do not see where i can login and return to my app with this example :( – duong khang Mar 01 '16 at 14:14

0 Answers0