I want to list a bunch of videos from YouTube in my mobile app using angularjs. Preferrably I\'d like to list all videos of a user/channels specific playlist.
I\'ve
You have to use Google APIs Client Library so that gapi
object will be defined and examples from google will work.
Include this in the bottom of the page:
And than define callback which will proceed with authorization and your logic:
googleApiClientReady = function() {
gapi.auth.init(function() {
// Other code following the example
});
}
In general as per Google documentation there are
The application loads the JavaScript client library.
The application references its API key, which authenticates the application with Google services.
If the application needs access to the user's personal information, it opens a session with a Google auth server. The auth server opens a dialog box which prompts the user to authorize the use of personal information.
The application loads the API for the Google service.
The application initializes a request object (also called a service object) that specifies the data to be returned by the API.
The application executes the request and processes the data returned by the API.
Here is a working example of basic google API authorization process