public final class Twitter extends AndroidNonvisibleComponent implements ActivityResultListener, Component
form
ACCELEROMETER_SENSITIVITY_MODERATE, ACCELEROMETER_SENSITIVITY_STRONG, ACCELEROMETER_SENSITIVITY_WEAK, ALIGNMENT_CENTER, ALIGNMENT_NORMAL, ALIGNMENT_OPPOSITE, ASSET_DIRECTORY, BUTTON_SHAPE_DEFAULT, BUTTON_SHAPE_OVAL, BUTTON_SHAPE_RECT, BUTTON_SHAPE_ROUNDED, COLOR_BLACK, COLOR_BLUE, COLOR_CYAN, COLOR_DEFAULT, COLOR_DKGRAY, COLOR_GRAY, COLOR_GREEN, COLOR_LTGRAY, COLOR_MAGENTA, COLOR_NONE, COLOR_ORANGE, COLOR_PINK, COLOR_RED, COLOR_WHITE, COLOR_YELLOW, DEFAULT_VALUE_COLOR_BLACK, DEFAULT_VALUE_COLOR_BLUE, DEFAULT_VALUE_COLOR_CYAN, DEFAULT_VALUE_COLOR_DEFAULT, DEFAULT_VALUE_COLOR_DKGRAY, DEFAULT_VALUE_COLOR_GRAY, DEFAULT_VALUE_COLOR_GREEN, DEFAULT_VALUE_COLOR_LTGRAY, DEFAULT_VALUE_COLOR_MAGENTA, DEFAULT_VALUE_COLOR_NONE, DEFAULT_VALUE_COLOR_ORANGE, DEFAULT_VALUE_COLOR_PINK, DEFAULT_VALUE_COLOR_RED, DEFAULT_VALUE_COLOR_WHITE, DEFAULT_VALUE_COLOR_YELLOW, DIRECTION_EAST, DIRECTION_MAX, DIRECTION_MIN, DIRECTION_NONE, DIRECTION_NORTH, DIRECTION_NORTHEAST, DIRECTION_NORTHWEST, DIRECTION_SOUTH, DIRECTION_SOUTHEAST, DIRECTION_SOUTHWEST, DIRECTION_WEST, FONT_DEFAULT_SIZE, LAYOUT_ORIENTATION_HORIZONTAL, LAYOUT_ORIENTATION_VERTICAL, LENGTH_FILL_PARENT, LENGTH_PREFERRED, LENGTH_UNKNOWN, SLIDER_MAX_VALUE, SLIDER_MIN_VALUE, SLIDER_THUMB_VALUE, TOAST_LENGTH_LONG, TOAST_LENGTH_SHORT, TYPEFACE_DEFAULT, TYPEFACE_MONOSPACE, TYPEFACE_SANSSERIF, TYPEFACE_SERIF
Constructor and Description |
---|
Twitter(ComponentContainer container) |
Modifier and Type | Method and Description |
---|---|
void |
Authorize()
Authenticate to Twitter using OAuth
|
void |
CheckAuthorized()
Check whether we already have a valid Twitter access token
|
java.lang.String |
ConsumerKey()
ConsumerKey property getter method.
|
void |
ConsumerKey(java.lang.String consumerKey)
ConsumerKey property setter method: sets the consumer key to be used when
authorizing with Twitter via OAuth.
|
java.lang.String |
ConsumerSecret()
ConsumerSecret property getter method.
|
void |
ConsumerSecret(java.lang.String consumerSecret)
ConsumerSecret property setter method: sets the consumer secret to be used
when authorizing with Twitter via OAuth.
|
void |
DeAuthorize()
Remove authentication for this app instance
|
void |
DirectMessage(java.lang.String user,
java.lang.String message)
Sends a direct message to a specified username.
|
java.util.List<java.lang.String> |
DirectMessages() |
void |
DirectMessagesReceived(java.util.List<java.lang.String> messages)
Indicates when all the direct messages requested through
RequestDirectMessages() have been received. |
void |
Follow(java.lang.String user)
Starts following a user.
|
java.util.List<java.lang.String> |
Followers() |
void |
FollowersReceived(java.util.List<java.lang.String> followers2)
Indicates when all of your followers requested through
RequestFollowers() have been received. |
java.util.List<java.util.List<java.lang.String>> |
FriendTimeline() |
void |
FriendTimelineReceived(java.util.List<java.util.List<java.lang.String>> timeline)
Indicates when the friend timeline requested through
RequestFriendTimeline() has been received. |
void |
IsAuthorized()
Indicates when the login has been successful.
|
void |
Login(java.lang.String username,
java.lang.String password)
Deprecated.
|
java.util.List<java.lang.String> |
Mentions() |
void |
MentionsReceived(java.util.List<java.lang.String> mentions)
Indicates when all the mentions requested through
RequestMentions() have been received. |
void |
RequestDirectMessages()
Gets the most recent messages sent directly to you.
|
void |
RequestFollowers()
Gets who is following you.
|
void |
RequestFriendTimeline()
Gets the most recent 20 messages in the user's timeline.
|
void |
RequestMentions()
Gets the most recent messages where your username is mentioned.
|
void |
resultReturned(int requestCode,
int resultCode,
android.content.Intent data)
The callback method used to report Activity results back to the caller.
|
java.util.List<java.lang.String> |
SearchResults() |
void |
SearchSuccessful(java.util.List<java.lang.String> searchResults)
Indicates when the search requested through
SearchTwitter(String)
has completed. |
void |
SearchTwitter(java.lang.String query)
Search for tweets or labels
|
void |
StopFollowing(java.lang.String user)
Stops following a user.
|
void |
Tweet(java.lang.String status)
Sends a Tweet of the currently logged in user.
|
void |
TweetWithImage(java.lang.String status,
java.lang.String imagePath)
Tweet with Image, Uploaded to Twitter
|
java.lang.String |
TwitPic_API_Key()
Deprecated.
|
void |
TwitPic_API_Key(java.lang.String TwitPic_API_Key)
Deprecated.
|
java.lang.String |
Username() |
getDispatchDelegate
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getDispatchDelegate
public Twitter(ComponentContainer container)
@Deprecated public void Login(java.lang.String username, java.lang.String password)
public java.lang.String Username()
public java.lang.String ConsumerKey()
public void ConsumerKey(java.lang.String consumerKey)
consumerKey
- the key for use in Twitter OAuthpublic java.lang.String ConsumerSecret()
public void ConsumerSecret(java.lang.String consumerSecret)
consumerSecret
- the secret for use in Twitter OAuth@Deprecated public java.lang.String TwitPic_API_Key()
@Deprecated public void TwitPic_API_Key(java.lang.String TwitPic_API_Key)
TwitPic_API_Key
- the API Key for image uploading, given by TwitPicpublic void IsAuthorized()
public void Authorize()
public void CheckAuthorized()
public void resultReturned(int requestCode, int resultCode, android.content.Intent data)
ActivityResultListener
resultReturned
in interface ActivityResultListener
requestCode
- the originally passed in request code. Used to identify the call.resultCode
- the returned result code: Activity.RESULT_OK
or
Activity.RESULT_CANCELED
data
- the returned data, encapsulated as an Intent
.public void DeAuthorize()
public void Tweet(java.lang.String status)
public void TweetWithImage(java.lang.String status, java.lang.String imagePath)
public void RequestMentions()
public void MentionsReceived(java.util.List<java.lang.String> mentions)
RequestMentions()
have been received.public java.util.List<java.lang.String> Mentions()
public void RequestFollowers()
public void FollowersReceived(java.util.List<java.lang.String> followers2)
RequestFollowers()
have been received.public java.util.List<java.lang.String> Followers()
public void RequestDirectMessages()
public void DirectMessagesReceived(java.util.List<java.lang.String> messages)
RequestDirectMessages()
have been received.public java.util.List<java.lang.String> DirectMessages()
public void DirectMessage(java.lang.String user, java.lang.String message)
public void Follow(java.lang.String user)
public void StopFollowing(java.lang.String user)
public void RequestFriendTimeline()
public void FriendTimelineReceived(java.util.List<java.util.List<java.lang.String>> timeline)
RequestFriendTimeline()
has been received.public java.util.List<java.util.List<java.lang.String>> FriendTimeline()
public void SearchTwitter(java.lang.String query)
public void SearchSuccessful(java.util.List<java.lang.String> searchResults)
SearchTwitter(String)
has completed.public java.util.List<java.lang.String> SearchResults()