Connecting Klipfolio to Twitter

You can set up a connection between Klipfolio and your Twitter data to display your social media metrics on a dashboard.

This article includes:

What options do I have for visualizing my Twitter data?

Create data visualizations based on pre-built options or build your own. The choice is yours!

Pre-built by Klipfolio

In collaboration with industry experts and adhering to current best practices and trends, Klipfolio focuses on getting the most out of your data and presenting it in meaningful, actionable visualizations. Our pre-built content, including pre-built data sources and pre-built Klips, can act as a complete solution or as a starting point toward custom building.

  • Twitter pre-built data sources: Data sources provide the foundation for Klip building, so we suggest you create a data source as a first step (before building Klips and adding them to your dashboard). Our pre-built data sources focus on the most sought-after Twitter data and are found on the Service Connectors page, available from this link or from your list of data sources. When you select a service connector from this page, the data source for that service is automatically added.
  • Twitter pre-built Klips: Pre-built Klips enable you to quickly set up a dashboard using predefined visualizations that display common key metrics. Pre-built Klips are found in the Klip Gallery or, for White Label customers, in the Integration Gallery.

Custom-built by you

Taking the time to learn how to create your own data sources and Klips unlocks your data and enables you to control, manipulate, and transform it, leading you to unprecedented insights into your business.

  • Custom data sources: When you create a custom data source, you can either use the pre-built data source as a starting point from which to write your own query or you can write your own queries from the ground up and build a data source from scratch. You create custom-built data sources from the Service Connectors page, available from this link or from your list of data sources.
  • Custom Klips: Using our Klip Editor, you can construct and manipulate your data, including integrating multiple data sources, to produce unique, custom-built data visualizations. You create custom Klips from either your list of Klips or your Dashboard.

Regardless of whether you choose pre-built, custom-built, or a combination of both, before you start building Klips and dashboards you need to connect to Twitter data in Klipfolio.

How do I connect to Twitter data in Klipfolio?

When you connect your Twitter data to Klipfolio, you will be prompted to connect your Twitter account by entering your username and password.

Doing so will create a token that enables Klipfolio to securely access your Twitter account. Your token looks like George@Twitter. You can use and reuse the same token every time you connect to Twitter.

Note: You manage your connections (tokens) to Twitter in Klipfolio under Connected Accounts in the Account section.

How do I add a Twitter pre-built data source?

To add a Twitter pre-built data source:

  1. Navigate to the Service Connectors page in Klipfolio and choose Twitter from the list.
  2. Select a pre-built data source from the left section of the Choose a pre-built or custom connection page.
  3. If this is your first time connecting to Twitter:
    • Click Connect an account. Enter your Twitter login credentials and click Next. If prompted, click Allow Access to enable Klipfolio to securely access your Twitter data. Click Continue.
  4. If you have connected with Twitter before:
    • Select an existing connection (token) from the drop-down list and click Continue.
  5. On the Configure your data source page, if prompted, enter your Twitter Handle or other requested information.
  6. Click Get data or, if you want to modify the pre-built data request, click Switch to Custom settings.
    Note: If you switch back to the Basic settings page after making changes in the Custom settings page, your changes will not be saved.
  7. Ensure this is the data you’re looking for and, optionally, select the checkbox to Model your data. Learn more about modelling your data source here.
  8. Click Continue.
  9. Name, choose refresh settings, and, optionally, share your data source.
  10. Click Save.

If you clicked Switch to Custom settings:

  1. On the Configure your data source page, modify the Query URL to get the data you want. You can use the existing information in the Query URL text box as a base. It was auto-filled based on the pre-built data source you selected on the Choose a pre-built or custom connection page.
  2. Click Get data.
  3. Ensure this is the data you’re looking for and, optionally, select the checkbox to Model your data. Learn more about modelling your data source here.
  4. Click Continue.
  5. Name, choose refresh settings, and, optionally, share your data source.
  6. Click Save.

How do I add Twitter pre-built Klips?

In the Klip Gallery or, for White Label customers, in the Integration Gallery, you can browse individual Twitter pre-built Klips and add them to your dashboard. You replace the sample data that is included in pre-built Klips with your own Twitter data by clicking the menu in the Klip and selecting Connect your data.

How do I create a Twitter custom-built data source?

If you choose to create a custom Twitter data source, you may need to enter your Twitter screen name into a specific spot in the query.

To find your Twitter screen name:

  1. Navigate to the Service Connectors page in Klipfolio and choose Twitter from the list.
  2. On the Choose a pre-built or custom connection page, click Create a custom Twitter data source.
  3. If this is your first time connecting to Twitter:
    • Click Connect an account. Enter your Twitter login credentials and click Next. If prompted, click Allow Access to enable Klipfolio to securely access your Twitter data. Click Continue.
  4. If you have connected with Twitter before:
    • Select an existing connection (token) from the drop-down list and click Continue.
  5. On the Configure your data source page, enter this query into the Query URL text box: https://api.twitter.com/1.1/lists/list.json.
  6. Click Get data.
  7. Find your screen_name under user. See the following example.

 

To create a Twitter custom-built data source:

  1. Navigate to the Service Connectors page in Klipfolio and choose Twitter from the list.
  2. On the Choose a pre-built or custom connection page, click Create a custom Twitter data source.
  3. If this is your first time connecting to Twitter:
    • Click Connect an account. Enter your Twitter login credentials and click Next. If prompted, click Allow Access to enable Klipfolio to securely access your Twitter data. Click Continue.
  4. If you have connected with Twitter before:
    • Select an existing connection (token) from the drop-down list and click Continue.
  5. On the Configure your data source page, adjust the Query URL information to replace any generic placeholder query information with your own.
    For example, replace <screenName> with your own screenname.
  6. Edit the Query URL to return the data you need. Refer to the Twitter API documentation for details.
  7. Click Get data.
  8. Ensure this is the data you’re looking for and, optionally, select the checkbox to Model your data. Learn more about modelling your data source here.
  9. Click Continue.
  10. Name, choose refresh settings, and, optionally, share your data source.
  11. Click Save.

How do I create a Twitter custom Klip?

You create custom Klips from either your list of Klips or your Dashboard. You choose a data visualization format, for example, a pie chart, gauge, or table, and decide whether you want to use an existing data source or create a new one. In the Klip Editor, there are limitless opportunities to modify, relate, and display your data. See the following related articles for more information and get building!

More about Twitter's API and queries

Klipfolio connects to hundreds of services in the cloud that have a REST API. If you take the time to learn your service’s API to create queries for the data you want, your possibilities are endless. Here’s a quick overview video on APIs and Klipfolio:

 Klipfolio API's 101

If you need assistance using APIs, enlist a data analyst or developer.

Use the Twitter API Console to build and test your queries before you use them to bring data into Klipfolio.

Refer to the Twitter API documentation to discover more data requests.

See the reference table below for API related information and sample queries.

API Documentation Twitter API documentation
API Explorer Twitter API Console

Authentication Method

OAuth Token Authentication
Response Format JSON

Date Format

Many Klips that use Twitter data need a date range that is dynamic. Learn more here.

Sample Queries

Returns 50 most recent mentions, including favourites, retweets, and mentions: 

https://api.twitter.com/1.1/statuses/mentions_timeline.json?count=50

Returns tweets for a user named “TwitterUser” in the last 30 days:

https://api.twitter.com/1.1/search/tweets.json?q=%40TwitterUser&start-date={date.last30Days}&end-date={date.today}

Note: This query uses %40 for the @ symbol.

Related articles

Have more questions? Submit a request