abstract class FacebookBaseImpl extends java.lang.Object implements java.io.Serializable, OAuthSupport
| Modifier and Type | Field and Description |
|---|---|
protected Authorization |
auth |
protected Configuration |
conf |
protected facebook4j.internal.json.z_F4JInternalFactory |
factory |
protected facebook4j.internal.http.HttpClientWrapper |
http |
protected java.lang.String |
id |
protected java.lang.String |
name |
private static long |
serialVersionUID |
| Constructor and Description |
|---|
FacebookBaseImpl(Configuration conf,
Authorization auth) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
ensureAuthorizationEnabled() |
boolean |
equals(java.lang.Object obj) |
AccessToken |
extendTokenExpiration()
Extends this instance's short-lived-token expiration.
|
AccessToken |
extendTokenExpiration(java.lang.String shortLivedToken)
Extends the short-lived-token expiration.
|
protected void |
fillInIDAndName() |
Authorization |
getAuthorization() |
Configuration |
getConfiguration() |
java.lang.String |
getId() |
java.lang.String |
getName() |
private OAuthSupport |
getOAuth() |
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.
|
int |
hashCode() |
private void |
init() |
private void |
readObject(java.io.ObjectInputStream stream) |
protected void |
setFactory() |
protected void |
setHttp() |
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 |
shutdown() |
java.lang.String |
toString() |
private void |
writeObject(java.io.ObjectOutputStream out) |
private static final long serialVersionUID
protected transient facebook4j.internal.http.HttpClientWrapper http
protected facebook4j.internal.json.z_F4JInternalFactory factory
protected Configuration conf
protected Authorization auth
protected transient java.lang.String id
protected transient java.lang.String name
FacebookBaseImpl(Configuration conf, Authorization auth)
private void init()
protected void setHttp()
protected void setFactory()
public java.lang.String getId()
throws FacebookException,
java.lang.IllegalStateException
FacebookExceptionjava.lang.IllegalStateExceptionpublic java.lang.String getName()
throws FacebookException,
java.lang.IllegalStateException
FacebookExceptionjava.lang.IllegalStateExceptionprotected void fillInIDAndName()
throws FacebookException
FacebookExceptionpublic final Authorization getAuthorization()
public Configuration getConfiguration()
public void shutdown()
protected final void ensureAuthorizationEnabled()
private void writeObject(java.io.ObjectOutputStream out)
throws java.io.IOException
java.io.IOExceptionprivate void readObject(java.io.ObjectInputStream stream)
throws java.io.IOException,
java.lang.ClassNotFoundException
java.io.IOExceptionjava.lang.ClassNotFoundExceptionpublic void setOAuthAppId(java.lang.String appId,
java.lang.String appSecret)
setOAuthAppId in interface OAuthSupportappId - OAuth AppIDappSecret - OAuth App secretpublic void setOAuthPermissions(java.lang.String permissions)
setOAuthPermissions in interface OAuthSupportpermissions - comma-separated permission namespublic java.lang.String getOAuthAuthorizationURL(java.lang.String callbackURL)
getOAuthAuthorizationURL in interface OAuthSupportpublic java.lang.String getOAuthAuthorizationURL(java.lang.String callbackURL,
java.lang.String state)
getOAuthAuthorizationURL in interface OAuthSupportpublic java.lang.String getOAuthAuthorizationURL(java.lang.String callbackURL,
AuthOption authOption)
getOAuthAuthorizationURL in interface OAuthSupportpublic java.lang.String getOAuthReAuthenticationURL(java.lang.String callbackURL,
java.lang.String nonce)
OAuthSupportgetOAuthReAuthenticationURL in interface OAuthSupportcallbackURL - callback urlnonce - a completely arbitrary alphanumeric code that your app generates. see: The auth_nonce parameterpublic AccessToken getOAuthAccessToken()
getOAuthAccessToken in interface OAuthSupportpublic AccessToken getOAuthAccessToken(java.lang.String oauthCode) throws FacebookException
getOAuthAccessToken in interface OAuthSupportoauthCode - OAuth code.FacebookException - when Facebook service or network is unavailable, or the user has not authorizedpublic AccessToken getOAuthAccessToken(java.lang.String oauthCode, java.lang.String callbackURL) throws FacebookException
getOAuthAccessToken in interface OAuthSupportoauthCode - OAuth code.callbackURL - callback URLFacebookException - when Facebook service or network is unavailable, or the user has not authorizedpublic AccessToken getOAuthAppAccessToken() throws FacebookException
getOAuthAppAccessToken in interface OAuthSupportFacebookException - when Facebook service or network is unavailable, or the user has not authorizedpublic DeviceCode getOAuthDeviceCode() throws FacebookException
OAuthSupportgetOAuthDeviceCode in interface OAuthSupportFacebookException - when Facebook service or network is unavailable, or the user has not authorizedpublic AccessToken getOAuthDeviceToken(DeviceCode deviceCode) throws FacebookException
OAuthSupportgetOAuthDeviceToken in interface OAuthSupportFacebookException - when Facebook service or network is unavailable, or the user has not authorizedpublic void setOAuthAccessToken(AccessToken accessToken)
setOAuthAccessToken in interface OAuthSupportaccessToken - access tokenpublic java.lang.String getOAuthCallbackURL()
getOAuthCallbackURL in interface OAuthSupportpublic void setOAuthCallbackURL(java.lang.String callbackURL)
setOAuthCallbackURL in interface OAuthSupportcallbackURL - Callback URLpublic AccessToken extendTokenExpiration(java.lang.String shortLivedToken) throws FacebookException
OAuthSupportextendTokenExpiration in interface OAuthSupportshortLivedToken - access tokenFacebookException - when Facebook service or network is unavailable, or the user has not authorizedpublic AccessToken extendTokenExpiration() throws FacebookException
OAuthSupportextendTokenExpiration in interface OAuthSupportFacebookException - when Facebook service or network is unavailable, or the user has not authorizedpublic AccessToken getOAuthAccessTokenInfo(java.lang.String accessToken) throws FacebookException
OAuthSupportgetOAuthAccessTokenInfo in interface OAuthSupportaccessToken - access tokenFacebookException - when Facebook service or network is unavailable, or the user has not authorizedpublic AccessToken getOAuthAccessTokenInfo() throws FacebookException
OAuthSupportgetOAuthAccessTokenInfo in interface OAuthSupportFacebookException - when Facebook service or network is unavailable, or the user has not authorizedprivate OAuthSupport getOAuth()
public boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Object