Representing authorized Access Token which is passed to the service provider in order to access protected resources.
the token and token secret can be stored into some persistent stores such as file system or RDBMS for the further accesses.
Returns the response stream.
This method cannot be called after calling asString() or asDcoument()
It is suggested to call disconnect() after consuming the stream.
FeedMonitor is a simple feed monitoring application.
FeedMonitor monitors specified feeds and reports newly posted entries to the specified Twitter account every 10 minutes.
It is possible to specify multiple configuration files.
Numeric parameter will be recognized as monitoring interverval in minutes.
Usage: java twitter4j.examples.FeedMonitor [config_file_path ..] [interval(min)]
If no configuration file path is specified, FeedMonitor will look for default configuration file name - "feedmonitor.properties".
The configuration file format is Java standard properties file format with following properties:
feedurl : the feed URL you want to monitor
id : Twitter id
password : Twitter password
Starts listening on a percentage of all public statuses, suitable for data mining and research applications that require a statistically significant sample.
Returns a status stream for a percentage of all public statuses, suitable for data mining and research applications that require a statistically significant sample.
This method calls http://twitter.com/statuses/public_timeline
Returns the 20 most recent statuses from non-protected users who have set a custom user icon.
Main entry point for this application.
If config_file_path is not specified, feedmonitor.properties will be used.
Usage: java twitter4j.examples.FeedMonitor [config_file_path ..] [interval(min)]
The request parameters are collected, sorted and concatenated into a normalized string:
• Parameters in the OAuth HTTP Authorization header excluding the realm parameter.
• Parameters in the HTTP POST request body (with a content-type of application/x-www-form-urlencoded).
• HTTP GET parameters added to the URLs in the query part (as defined by [RFC3986] section 3).
The oauth_signature parameter MUST be excluded.
The parameters are normalized into a single string as follows:
1.
Example application that uses OAuth method to acquire access to your account.
This application illustrates how to use OAuth method with Twitter4J.
Usage: java -Dtwitter4j.oauth.consumerKey=[consumer key] -Dtwitter4j.oauth.consumerSecret=[consumer secret] twitter4j.examples.OAuthUpdate [message]
Example application that sends a message to specified Twitter-er from specified account.
Usage: java twitter4j.examples.DirectMessage senderID senderPassword message recipientId
An exception class that will be thrown when TwitterAPI calls are failed.
In case the Twitter server returned HTTP error code, you can get the HTTP status code using getStatusCode() method.
Returns an HTTP 200 OK response code and a representation of the requesting user if authentication was successful; returns a 401 status code and an error message if not.