Introduction

This tutorial explains how to retrieve the API keys that are needed to add a custom Twitter Widget to your website. In order to add a custom Twitter Widget to your site, you will first need to set up a Twitter application on https://apps.twitter.com/.

Once the Twitter application is created, you will be able to generate a set of  four API keys that will allow your widget to access your Twitter feed. The tutorial below explains the process.

Step 1 - Create a New Application

To create the application, sign into https://apps.twitter.com/ with your official Twitter account. Next, click "Create a new app" and fill in the form. (Note: you must have a mobile number associated with your Twitter account to create an application.)

Name: Enter a unique name here (ex. "U.S. Senator (name here) Twitter Widget")
Description: Enter the following text: To pull the twitter feed into the home page of my website.
Website: Use your main URL (https://name.senate.gov)
Callback URL: Leave blank.

Finally, agree to the terms and click "Submit."

Step 2 - Generate the Keys

After the application is created, you should see a button which will allow you to generate the API keys. In order to create the widget, we will need the following keys, as well as your Twitter Username

  • Consumer Key
  • Consumer Secret
  • Access Token
  • Access Secret
  • Twitter Username

Once you have generated the information listed above, please send it in an email to [email protected] (or reply to an existing ticket).