Setting up selected REST sources for data loading

The following procedures explain how to acquire the connection requirements for selected social networking platforms:

  • Facebook
  • LinkedIn
  • Twitter
  • 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.

Warning: The procedures below are accurate for the particular requests illustrated. The procedures for alternative requests may differ from those illustrated. Also, social networking platforms used in the illustrated procedures may change their interface or the other details of the procedure. When that happens, the procedures below will not be completely accurate.

Connecting to Facebook

Do the following:

  1. Sign into your Facebook account at:

  2. 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.

  3. Navigate to the developer explorer page at:

  4. Select the application.
  5. 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.

  6. Generate an API method.

  7. Submit.

  8. Go to the connection dialog in the REST Connector.

  9. 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)'

  10. 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.

  11. Complete the remaining fields and selections in the connection dialog.

    Create a REST connection

Connecting to LinkedIn

Do the following:

  1. Sign into your LinkedIn account at:

  2. Navigate to the developer page at:

  3. 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.

  4. Follow the LinkedIn instructions for setting up OAuth 2.0 authentication and acquiring an access code: Authenticating with OAuth 2.0
  5. Go to the connection dialog in the REST Connector.

  6. In the URL field, enter the URL generated for your LinkedIn application.

  7. Enter your LinkedIn credentials in the User name and Password fields.

  8. Add a parameter in the Query parameters field for the access token you received for the application.

    For example:

  9. Complete the remaining fields and selections in the connection dialog.

    Create a REST connection

Connecting to Twitter

Do the following:

  1. Sign into your Twitter account at:

  2. Enter the URL to the developer page at:

  3. 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."

  4. Select a Service.
  5. Select an API method.

    For example, you can select GET methods to "/trends/place.json" or "/trends/closest.json."

  6. 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.

  7. Go to the connection dialog in the REST Connector.

  8. In the URL field, enter the URL generated for your Twitter connection.

  9. Enter your Twitter credentials in the User name and Password fields.

  10. Add parameters in the Query headers field for the authorization token, host name, and X-Target-URI.

    For example:

  11. Complete the remaining fields and selections in the connection dialog.

    Create a REST connection

Connecting to Google Analytics

Do the following:

  1. 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.

  2. Navigate to the developer console at:

  3. 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.

  4. 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.

  5. Select a calendar API.

    For this illustration, use calendar.events.list.

  6. 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."

  7. Select Execute to generate the request.

    The request looks like:

    GET https://www.googleapis.com/calendar/v3/calendars/primary/events?key={YOUR_API_KEY}

  8. Open Developer tools in Google Chrome and select the Network tab.
  9. Select Execute to generate the request a second time.
  10. Select the request in the name column that corresponds to the GET request generated when you executed the request.
  11. Copy the Request URL, including the key.
  12. Go to the connection dialog in the REST Connector and paste the Request URL in the URL field.

  13. 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.

  14. Complete the remaining fields and selections in the connection dialog.

    Create a REST connection

Did this information help you?

Thanks for letting us know. Is there anything you'd like to tell us about this topic?

Can you tell us why it did not help you and how we can improve it?