public interface OAuthSupport
| Modifier and Type | Method and Description |
|---|---|
AccessToken |
extendTokenExpiration()
Extends this instance's short-lived-token expiration.
|
AccessToken |
extendTokenExpiration(java.lang.String shortLivedToken)
Extends the short-lived-token expiration.
|
AccessToken |
getOAuthAccessToken()
Returns an access token associated with this instance.
|
AccessToken |
getOAuthAccessToken(java.lang.String oauthCode)
Exchange the code for a User Access Token.
|
AccessToken |
getOAuthAccessToken(java.lang.String oauthCode,
java.lang.String callbackURL)
Exchange the code for a User Access Token.
|
AccessToken |
getOAuthAccessTokenInfo()
Returns the access token information.
|
AccessToken |
getOAuthAccessTokenInfo(java.lang.String accessToken)
Returns the access token information.
|
AccessToken |
getOAuthAppAccessToken()
Returns an App Access Token.
|
java.lang.String |
getOAuthAuthorizationURL(java.lang.String callbackURL) |
java.lang.String |
getOAuthAuthorizationURL(java.lang.String callbackURL,
AuthOption authOption) |
java.lang.String |
getOAuthAuthorizationURL(java.lang.String callbackURL,
java.lang.String state) |
java.lang.String |
getOAuthCallbackURL()
Sets the access token and callback URL
|
DeviceCode |
getOAuthDeviceCode()
Returns a generated device code.
|
AccessToken |
getOAuthDeviceToken(DeviceCode deviceCode)
Returns a Device Access Token.
|
java.lang.String |
getOAuthReAuthenticationURL(java.lang.String callbackURL,
java.lang.String nonce)
Returns the URL that asks the person to re-authenticate unconditionally.
|
void |
setOAuthAccessToken(AccessToken accessToken)
Sets the access token
|
void |
setOAuthAppId(java.lang.String appId,
java.lang.String appSecret)
sets the OAuth AppID and App secret
|
void |
setOAuthCallbackURL(java.lang.String callbackURL)
Sets the access token
|
void |
setOAuthPermissions(java.lang.String permissions)
sets the permissions
|
void setOAuthAppId(java.lang.String appId,
java.lang.String appSecret)
appId - OAuth AppIDappSecret - OAuth App secretjava.lang.IllegalStateException - when OAuth AppId has already been setvoid setOAuthPermissions(java.lang.String permissions)
permissions - comma-separated permission namesjava.lang.String getOAuthAuthorizationURL(java.lang.String callbackURL)
java.lang.String getOAuthAuthorizationURL(java.lang.String callbackURL,
java.lang.String state)
java.lang.String getOAuthAuthorizationURL(java.lang.String callbackURL,
AuthOption authOption)
java.lang.String getOAuthReAuthenticationURL(java.lang.String callbackURL,
java.lang.String nonce)
callbackURL - callback urlnonce - a completely arbitrary alphanumeric code that your app generates. see: The auth_nonce parameterAccessToken getOAuthAccessToken()
java.lang.IllegalStateException - when this instance has no access tokenAccessToken getOAuthAccessToken(java.lang.String oauthCode) throws FacebookException
oauthCode - OAuth code.FacebookException - when Facebook service or network is unavailable, or the user has not authorizedAccessToken getOAuthAccessToken(java.lang.String oauthCode, java.lang.String callbackURL) throws FacebookException
oauthCode - OAuth code.callbackURL - callback URLFacebookException - when Facebook service or network is unavailable, or the user has not authorizedAccessToken getOAuthAppAccessToken() throws FacebookException
FacebookException - when Facebook service or network is unavailable, or the user has not authorizedDeviceCode getOAuthDeviceCode() throws FacebookException
FacebookException - when Facebook service or network is unavailable, or the user has not authorizedAccessToken getOAuthDeviceToken(DeviceCode deviceCode) throws FacebookException
FacebookException - when Facebook service or network is unavailable, or the user has not authorizedvoid setOAuthAccessToken(AccessToken accessToken)
accessToken - access tokenjava.lang.String getOAuthCallbackURL()
void setOAuthCallbackURL(java.lang.String callbackURL)
callbackURL - Callback URLAccessToken extendTokenExpiration(java.lang.String shortLivedToken) throws FacebookException
shortLivedToken - access tokenFacebookException - when Facebook service or network is unavailable, or the user has not authorizedAccessToken extendTokenExpiration() throws FacebookException
FacebookException - when Facebook service or network is unavailable, or the user has not authorizedAccessToken getOAuthAccessTokenInfo(java.lang.String accessToken) throws FacebookException
accessToken - access tokenFacebookException - when Facebook service or network is unavailable, or the user has not authorizedAccessToken getOAuthAccessTokenInfo() throws FacebookException
FacebookException - when Facebook service or network is unavailable, or the user has not authorized