Setting up selected REST sources for data loading
- Google Analytics
You use the developer interface for each platform to get credentials and query parameters for the specific application or service you intend to collect data from.
Connecting to Facebook
Do the following:
-
Sign into your Facebook account at:
-
Create a new application.
The registration and validation process for the application takes time, so the application may not be available as soon as you add it. If you have an application that was written previously, you can access that immediately, but it must be an application created with a developer account.REST Connector
-
Navigate to the developer explorer page at:
- Select the application.
-
Select Get Access Token.
The objective is to provide access to data. Get Access Token is currently the interface label Facebook uses. Even if that label changes, there must be a means of getting an access token.
-
Generate an API method.
-
Submit.
-
Go to the connection dialog in the .
-
In the URL field, enter the URL from your Facebook application.
The URL contains the API method that determines the type of response the data source returns. For example:
https://graph.facebook.com/+'me?fields=albums.limit(5),posts.limit(5)'
-
Add a parameter in the Query parameters field for the access token you received for the application.
For example:
The access token authenticates your access to the Facebook data. You do not need Windows authentication nor do you need to provide your Facebook credentials in the User name and Password fields.
-
Complete the remaining fields and selections in the connection dialog.
Connecting to LinkedIn
Do the following:
-
Sign into your LinkedIn account at:
-
Navigate to the developer page at:
-
Create a new application.
The registration and validation process for the application takes time, so the application may not be available as soon as you add it. If you have an application that was written previously, you can access that immediately.
- Follow the LinkedIn instructions for setting up OAuth 2.0 authentication and acquiring an access code: Authenticating with OAuth 2.0 Overview
-
Go to the connection dialog in the REST Connector.
-
In the URL field, enter the URL generated for your LinkedIn application.
-
Enter your LinkedIn credentials in the User name and Password fields.
-
Add a parameter in the Query parameters field for the access token you received for the application.
For example:
-
Complete the remaining fields and selections in the connection dialog.
Connecting to Twitter
Do the following:
-
Sign into your Twitter account at:
-
Enter the URL to the developer page at:
-
Select Authentication--OAuth 1.
You are asked to authorize the developer console to use your Twitter authentication. When you authorize, the Authentication field shows your Twitter account user name. For example, "twitter-JonSmith."
- Select a Service.
-
Select an API method.
For example, you can select GET methods to "/trends/place.json" or "/trends/closest.json."
-
Select Send to generate the JSON URL and Headers.
The JSON URL looks like:
https://api.twitter.com/1.1/help/configuration.json
The Headers include OAuth authorization with a token value, a host name, and X-Target-URI that are used in the Query headers section of the Create a connection - REST step in the Qlik REST Connector.
-
Go to the connection dialog in the REST Connector.
-
In the URL field, enter the URL generated for your Twitter connection.
-
Enter your Twitter credentials in the User name and Password fields.
-
Add parameters in the Query headers field for the authorization token, host name, and X-Target-URI.
For example:
-
Complete the remaining fields and selections in the connection dialog.
Connecting to Google Analytics
Do the following:
-
Sign into your Google account at:
It is recommended that you use the Google Chrome browser because it provides easy access to developer tools you need to locate the authorization code and other query headers.
-
Navigate to the developer console at:
-
Select an API method from the list in the APIs Explorer.
For example, you can select methods such as Analytics.Reporting API or BigQuery API. For this illustration, choose Calendar API.
-
Turn on Authorize requests using OAuth 2.0.
When you turn on the authorization, you are asked to authorize scopes that the API has access to.
-
Select a calendar API.
For this illustration, use calendar.events.list.
-
Enter required fields for the method, if any.
Each method has fields, such as Unique table ID for retrieving real time data, and the fields marked in red are required. For the calendar.events.list, the calendarId is required. To access the calendar of the currently logged in user, enter "primary."
-
Select Execute to generate the request.
The request looks like:
GET https://www.googleapis.com/calendar/v3/calendars/primary/events?key={YOUR_API_KEY}
- Open Developer tools in Google Chrome and select the Network tab.
- Select Execute to generate the request a second time.
- Select the request in the name column that corresponds to the GET request generated when you executed the request.
- Copy the Request URL, including the key.
-
Go to the connection dialog in the REST Connector and paste the Request URL in the URL field.
-
Add parameters in the Query headers for the authorization token and the other Request Headers listed in the Developer tools panel.
For example:
The authorization token authenticates your access to the Google data. You do not need Windows authentication nor do you need to provide your Google credentials in the User name and Password fields.
-
Complete the remaining fields and selections in the connection dialog.