O'Reilly logo

Developing Responsive Web Applications with AJAX and jQuery by Sandeep Kumar Patel

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Posting a tweet

In this section, we will learn how to tweet about a product using the Twitter4J API. The approach to achieve this is as follows:

  • Create a Twitter button
  • Set up a new Twitter application
  • Develop a Twitter servlet
  • Develop a Twitter callback servlet

The following diagram shows the important entities involved in a Twitter-based client application. The arrow marks represent the communication between each component while posting a tweet to a user timeline:

Posting a tweet

Creating a Twitter button

In this section, we will create a Tweet button for each product. When this button is clicked, a message is posted to the user's timeline about the product. The following ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required