diff --git a/docs/src/reference/docbook/twitter.xml b/docs/src/reference/docbook/twitter.xml index 4f832993c4..60198e8b2f 100644 --- a/docs/src/reference/docbook/twitter.xml +++ b/docs/src/reference/docbook/twitter.xml @@ -1,25 +1,28 @@ + Twitter Adapter - Spring Integration provides support for interacting with Twitter via Twitter adapters. With Twitter adapters you can both - receive and send Twitter messages. + Spring Integration provides support for interacting with Twitter. With the Twitter adapters you can both + receive and send Twitter messages. +
Introduction - Twitter is a social networking and microblogging service that enables its users to send and read messages known as tweets. + Twitter is a social networking and micro-blogging service that enables its users to send and read messages known as tweets. Tweets are text-based posts of up to 140 characters displayed on the author's profile page and delivered to the author's subscribers who are known as followers. - Current Twitter support is based on Twitter4J API, - however future version will be changed to use Spring Social + Current Twitter support is based on the Twitter4J API. + However, future versions will be changed to use the Spring Social project as it is nearing its first release at the time of writing. + Spring Integration provides a convenient namespace configuration to define Twitter artifacts. Twitter OAuth Configuration - - Twitter API allows for both authenticated and anonymous operations. For authenticated operations Twitter uses OAuth + The Twitter API allows for both authenticated and anonymous operations. For authenticated operations Twitter uses OAuth - an authentication protocol that allows users to approve application to act on their behalf without sharing their password. More information can be found at http://oauth.net/ or in this article http://hueniverse.com/oauth/ from Hueniverse. Please also see OAuth FAQ for more information about OAuth and Twitter. - In order to use OAuth authentication/authorization with Twitter you must create new Application on Twitter Developers site. - Follow the directions below to create a new application and obtain consumer keys and access token: + In order to use OAuth authentication/authorization with Twitter you must create new Application on the Twitter Developers site. + Follow the directions below to create a new application and obtain consumer keys and an access token: @@ -84,7 +86,7 @@ xsi:schemaLocation="http://www.springframework.org/schema/integration/twitter ]]> The values above are not real - As you can see form the configuration above all we need to do is to provide + As you can see from the configuration above all we need to do is to provide OAuth attributes as constructor arguments filling them with values you have obtained in the previous step. The order of constructor arguments is: 1) consumerKey; 2) consumerSecret; 3) accessToken; 4) accessTokenSecret; @@ -120,20 +122,20 @@ and configuring a property-placeholder pointing to he above propert twitter messages - tweets - Current release of Spring Integration provides support for receiving tweets as Public Messages, + The current release of Spring Integration provides support for receiving tweets as Public Messages, Direct Messages, Mention Messages as well as perform Searches Every Inbound Twitter Channel Adapter is a Polling consumer which means you have to provide a poller configuration. However, one important thing you must understand with regard to Twitter since its inner-workings are slightly different then any other poling consumer. Twitter defines a concept of Rate Limiting. You can read more about - it here: Rate Limiting . In the nutshell Rate Limiting + it here: Rate Limiting. In a nutshell Rate Limiting is the way Twitter manages how often an application can poll for updates. Luckily for you you don't have to worry about it since we are handling it internally polling for Messages (Tweets) from the Twitter account at the rate allowed by Twitter. - Another issue that we need to worry about is handling of the duplicates. The same adapter (e.g., Search or Timeline Update) - while polling on Twitter may receive the same values back. For example if you keep searching on Twitter with the same search + Another issue that we need to worry about is handling of duplicates. The same adapter (e.g., Search or Timeline Update) + while polling on Twitter may receive the same values more than once. For example if you keep searching on Twitter with the same search criteria you'll end up with the same set of tweets unless some other new tweet that matches your search criteria was posted in between your searches. In that situation you'll get all the tweets you had before plus the new one. But what you really want is only the new tweet. Spring Integration provides an elegant mechanism for handling these situations. @@ -202,8 +204,8 @@ The Poller that is configured as part of the any Inbound Twitter Adapter (see be encapsulated into a Spring Integration Message and sent to a channel specified via channel attribute. Currently the Payload type of any Message is org.springframework.integration.twitter.core.Tweet which is very similar to the object with the same name in Spring Social. As we migrate to Spring Social - we'll be depending on their API and some of the artifacts that ar currently in use will be obsolete, however we've already - made sure that the impact of such migration is minimal by alignning our API with the curent state (at the time of writing) + we'll be depending on their API and some of the artifacts that are currently in use will be obsolete, however we've already + made sure that the impact of such migration is minimal by aligning our API with the current state (at the time of writing) of Spring Social @@ -246,7 +248,7 @@ The Poller that is configured as part of the any Inbound Twitter Adapter (see be Twitter does not allow you to post duplicate Messages. This is a common problem during testing when the same code works the first time but doesn't work the second time,so make sure to change the content of the Message. - One thing that works good for testing is appent timestamp to the end of the message. + One thing that works good for testing is to append a timestamp to the end of the message.