Page added by Bilgin IbryamAvailable as of Camel 2.10 The Twitter component enables the most useful features of the Twitter API by encapsulating Twitter4J. It allows direct, polling, or event-driven consumption of timelines, users, trends, and direct messages. Also, it supports producing messages as status updates or direct messages. Twitter now requires the use of OAuth for all client application authentication. In order to use camel-twitter with your account, you'll need to create a new application within Twitter at https://dev.twitter.com/apps/new and grant the application access to your account. Finally, generate your access token and secret. Since all message bodies rely on Twitter4J objects, the additional Twitter4J dependencies will be necessary within your project. Maven users will need to add the following dependency to their pom.xml for this component: <dependency> <groupId>org.apache.camel</groupId> <artifactId>camel-twitter</artifactId> <version>x.x.x</version> <!-- use the same version as your Camel core version --> </dependency> <dependency> <groupId>org.twitter4j</groupId> <artifactId>twitter4j-core</artifactId> <version>${twitter4j-version}</version> </dependency> <dependency> <groupId>org.twitter4j</groupId> <artifactId>twitter4j-stream</artifactId> <version>${twitter4j-version}</version> </dependency> URI format
twitter://[endpoint]?[options]
URI Options
Consumer Endpoints:
Producer Endpoints:
Use casesTo create a status update within your Twitter profile, send this producer a String body.
twitter://timeline/user?consumerKey=[s]&consumerSecret=[s]&accessToken=[s]&accessTokenSecret=[s]
To poll, every 5 sec., all statuses on your home timeline:
twitter://timeline/home?type=polling&delay=5&consumerKey=[s]&consumerSecret=[s]&accessToken=[s]&accessTokenSecret=[s]
To search for all statuses with the keyword 'camel':
twitter://search?type=direct&keywords=camel&consumerKey=[s]&consumerSecret=[s]&accessToken=[s]&accessTokenSecret=[s]
See Also
Change Notification Preferences
View Online
|
Add Comment
|
- [CONF] Apache Camel > Twitter confluence
- [CONF] Apache Camel > Twitter confluence
- [CONF] Apache Camel > Twitter confluence
- [CONF] Apache Camel > Twitter confluence
- [CONF] Apache Camel > Twitter confluence
- [CONF] Apache Camel > Twitter confluence
- [CONF] Apache Camel > Twitter confluence