0

I am using https://github.com/christiansmith/ngGAPI this Services which helps me for the Google API Services V3 for Youtube. Though I have followed the instruction. Taken dependency as well. but it's not working. eg.

angular
    .module('app', [
        "gapi"
    ])
  .value('GoogleApp', {
        apiKey: 'API_KEY',
        clientId: 'NUMBERS.apps.googleusercontent.com',
        scopes: [
            'https://www.googleapis.com/auth/drive',
            'https://www.googleapis.com/auth/youtube',
            'https://www.googleapis.com/auth/userinfo.profile'
        ]
    })
   .controller('YoutubeController', ['$scope', 'Video', "Youtube", "GAPI",
    function ($scope, Video, Youtube, GAPI) {
        GAPI.init();
        $scope.videos = Youtube.search({part: 'snippet', q: 'Sample Text to Search'})
    }]);

Included Google Apis link as well. But it's giving me the error of GAPI.app.oauthToken is undefined or sometimes gapi.auth is undefined Please help

I am doing this all on local-server http://localhost:3000/#/

Sankalp
  • 1,300
  • 5
  • 28
  • 52

0 Answers0