Book Image

SPRING COOKBOOK

Book Image

SPRING COOKBOOK

Overview of this book

Table of Contents (19 chapters)
Spring Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Creating a Twitter application


A web application can access a Twitter account only through a Twitter application. In this recipe, we will create a Twitter application. We will obtain an API key and an API secret, which are two strings that our web application will use to connect to Twitter in the following recipes.

Getting ready

Log in to your Twitter account.

How to do it…

  1. Go to https://apps.twitter.com/.

  2. Click on Create New App.

  3. Fill in the form and create your application. Note that localhost is not a valid domain name for the Callback URL field, but an IP address works.

  4. On your application page, under Settings, check Allow this application to be used to Sign in with Twitter.

  5. Under Keys and Access Tokens, copy the API key and API secret values. You will use them in your web application to identify your Twitter application.