public final class ParseTwitterUtils
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
static Twitter |
getTwitter()
Gets the shared
Twitter singleton that Parse is using. |
static void |
initialize(java.lang.String consumerKey,
java.lang.String consumerSecret)
Initializes Twitter for use with Parse.
|
static void |
initialize(java.lang.String consumerKey,
java.lang.String consumerSecret,
java.lang.String callbackUrl)
Initializes Twitter for use with Parse.
|
static boolean |
isLinked(ParseUser user) |
static void |
link(ParseUser user,
android.content.Context context)
Deprecated.
Please use
linkInBackground(Context, ParseUser) instead. |
static void |
link(ParseUser user,
android.content.Context context,
SaveCallback callback)
Links a ParseUser to a Twitter account, allowing you to use Twitter for authentication, and
providing access to Twitter data for the user.
|
static void |
link(ParseUser user,
java.lang.String twitterId,
java.lang.String screenName,
java.lang.String authToken,
java.lang.String authTokenSecret)
Deprecated.
Please use
linkInBackground(ParseUser, String, String,
String, String) instead. |
static void |
link(ParseUser user,
java.lang.String twitterId,
java.lang.String screenName,
java.lang.String authToken,
java.lang.String authTokenSecret,
SaveCallback callback)
Links a ParseUser to a Twitter account, allowing you to use Twitter for authentication, and
providing access to Twitter data for the user.
|
static <any> |
linkInBackground(android.content.Context context,
ParseUser user)
Links a ParseUser to a Twitter account, allowing you to use Twitter for authentication, and
providing access to Twitter data for the user.
|
static <any> |
linkInBackground(ParseUser user,
java.lang.String twitterId,
java.lang.String screenName,
java.lang.String authToken,
java.lang.String authTokenSecret)
Links a ParseUser to a Twitter account, allowing you to use Twitter for authentication, and
providing access to Twitter data for the user.
|
static void |
logIn(android.content.Context context,
LogInCallback callback)
Logs in a ParseUser using Twitter for authentication.
|
static void |
logIn(java.lang.String twitterId,
java.lang.String screenName,
java.lang.String authToken,
java.lang.String authTokenSecret,
LogInCallback callback)
Logs in a ParseUser using Twitter for authentication.
|
static <any> |
logInInBackground(android.content.Context context)
Logs in a ParseUser using Twitter for authentication.
|
static <any> |
logInInBackground(java.lang.String twitterId,
java.lang.String screenName,
java.lang.String authToken,
java.lang.String authTokenSecret)
Logs in a ParseUser using Twitter for authentication.
|
static void |
unlink(ParseUser user)
Unlinks a user from a Twitter account.
|
static <any> |
unlinkInBackground(ParseUser user)
Unlinks a user from a Twitter account in the background.
|
static void |
unlinkInBackground(ParseUser user,
SaveCallback callback)
Unlinks a user from a Twitter account in the background.
|
public static Twitter getTwitter()
Twitter singleton that Parse is using.Twitter instance.public static void initialize(java.lang.String consumerKey,
java.lang.String consumerSecret)
link(ParseUser, Context, SaveCallback) and logIn(Context, LogInCallback).consumerKey - Your Twitter consumer key.consumerSecret - Your Twitter consumer secret.public static void initialize(java.lang.String consumerKey,
java.lang.String consumerSecret,
java.lang.String callbackUrl)
link(ParseUser, Context, SaveCallback) and logIn(Context, LogInCallback).consumerKey - Your Twitter consumer key.consumerSecret - Your Twitter consumer secret.callbackUrl - the callback urlpublic static boolean isLinked(ParseUser user)
true if the user is linked to a Twitter account.public static <any> linkInBackground(android.content.Context context,
ParseUser user)
user - The user to link to a Twitter account.context - An Android context from which the login dialog can be launched.@Deprecated
public static void link(ParseUser user,
android.content.Context context)
linkInBackground(Context, ParseUser) instead.public static void link(ParseUser user,
android.content.Context context,
SaveCallback callback)
user - The user to link to a Twitter account.context - An Android context from which the login dialog can be launched.callback - Callback for notifying the calling application when the Twitter authentication has
completed, failed, or been canceled.linkInBackground(Context, ParseUser)public static <any> linkInBackground(ParseUser user,
java.lang.String twitterId,
java.lang.String screenName,
java.lang.String authToken,
java.lang.String authTokenSecret)
user - The user to link to a Twitter account.twitterId - The user's Twitter ID.screenName - The user's Twitter screen name.authToken - The auth token for the session.authTokenSecret - The auth token secret for the session.@Deprecated
public static void link(ParseUser user,
java.lang.String twitterId,
java.lang.String screenName,
java.lang.String authToken,
java.lang.String authTokenSecret)
linkInBackground(ParseUser, String, String,
String, String) instead.public static void link(ParseUser user,
java.lang.String twitterId,
java.lang.String screenName,
java.lang.String authToken,
java.lang.String authTokenSecret,
SaveCallback callback)
user - The user to link to a Twitter account.twitterId - The user's Twitter ID.screenName - The user's Twitter screen name.authToken - The auth token for the session.authTokenSecret - The auth token secret for the session.callback - Callback for notifying that the authentication data has been saved to the ParseUser.linkInBackground(ParseUser, String, String, String, String)public static <any> logInInBackground(java.lang.String twitterId,
java.lang.String screenName,
java.lang.String authToken,
java.lang.String authTokenSecret)
twitterId - The user's Twitter ID.screenName - The user's Twitter screen name.authToken - The auth token for the session.authTokenSecret - The auth token secret for the session.public static void logIn(java.lang.String twitterId,
java.lang.String screenName,
java.lang.String authToken,
java.lang.String authTokenSecret,
LogInCallback callback)
twitterId - The user's Twitter ID.screenName - The user's Twitter screen name.authToken - The auth token for the session.authTokenSecret - The auth token secret for the session.callback - Callback for notifying that the authentication data has been saved to the ParseUser.logInInBackground(String, String, String, String)public static <any> logInInBackground(android.content.Context context)
context - An Android context from which the login dialog can be launched.public static void logIn(android.content.Context context,
LogInCallback callback)
context - An Android context from which the login dialog can be launched.callback - Callback for notifying the calling application when the Twitter authentication has
completed, failed, or been canceled.logInInBackground(android.content.Context)public static void unlink(ParseUser user)
throws ParseException
user - The user to unlink from a Facebook account.ParseExceptionpublic static <any> unlinkInBackground(ParseUser user)
user - The user to unlink from a Facebook account.public static void unlinkInBackground(ParseUser user,
SaveCallback callback)
user - The user to unlink from a Facebook account.callback - Callback for notifying when unlinking is complete.unlinkInBackground(ParseUser)