|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface LegacyFacebookClient
Specifies how a Legacy Facebook API client must operate.
Implementors must support Legacy authentication (API Key, Application Secret, and Session Key) as well as the new OAuth authentication method. Using OAuth authentication is much simpler and strongly recommended.
Green-field projects should use the new Facebook Graph API via
FacebookClient
instead.
execute(String, Parameter...)
family of methods should be
used when performing API calls that return a single object.executeForList(String, Class, Parameter...)
family of
methods should be used when performing API calls that return a list of
objects.executeMultiquery(Map, Class, Parameter...)
family of
methods should be used when performing
fql.multiquery
API calls.
Method Summary | ||
---|---|---|
|
execute(String method,
Class<T> resultType,
Parameter... parameters)
Executes a Facebook API method with the given parameters , mapping
the API response to a single instance of type resultType . |
|
void |
execute(String method,
Parameter... parameters)
Executes a Facebook API method with the given parameters , ignoring
the response. |
|
|
execute(String method,
String sessionKey,
Class<T> resultType,
Parameter... parameters)
Deprecated. Use execute(String, Class, Parameter...) instead.
Facebook is moving to OAuth and will stop supporting the old
session key authentication scheme soon. |
|
void |
execute(String method,
String sessionKey,
Parameter... parameters)
Deprecated. Use execute(String, Parameter...) instead. Facebook is
moving to OAuth and will stop supporting the old session key
authentication scheme soon. |
|
|
executeForList(String method,
Class<T> resultType,
Parameter... parameters)
Executes a Facebook API method with the given parameters , mapping
the API response to a List of instances of type resultType . |
|
|
executeForList(String method,
String sessionKey,
Class<T> resultType,
Parameter... parameters)
Deprecated. Use executeForList(String, Class, Parameter...)
instead. Facebook is moving to OAuth and will stop supporting
the old session key authentication scheme soon. |
|
|
executeMultiquery(Map<String,String> queries,
Class<T> resultType,
Parameter... additionalParameters)
Executes the fql.multiquery API call, mapping the API response to a single
instance of type resultType . |
|
|
executeMultiquery(Map<String,String> queries,
String sessionKey,
Class<T> resultType,
Parameter... additionalParameters)
Deprecated. Use executeMultiquery(Map, Class, Parameter...)
instead. Facebook is moving to OAuth and will stop supporting
the old session key authentication scheme soon. |
Method Detail |
---|
void execute(String method, Parameter... parameters)
parameters
, ignoring
the response.
method
- The Facebook API method to call, e.g. fql.query
.parameters
- Parameters to include in the API call.
FacebookException
- If an error occurs while performing the API call.@Deprecated void execute(String method, String sessionKey, Parameter... parameters)
execute(String, Parameter...)
instead. Facebook is
moving to OAuth and will stop supporting the old session key
authentication scheme soon.
parameters
, ignoring
the response.
method
- The Facebook API method to call, e.g. fql.query
.sessionKey
- A Facebook API session key if you're using the legacy API
key/Secret key authentication scheme. Must be null
if
using OAuth access token authentication.parameters
- Parameters to include in the API call.
FacebookException
- If an error occurs while performing the API call.
IllegalArgumentException
- If sessionKey
is provided when using OAuth access token
authentication.<T> T execute(String method, Class<T> resultType, Parameter... parameters)
parameters
, mapping
the API response to a single instance of type resultType
.
T
- Java type to map to.method
- The Facebook API method to call, e.g. fql.query
.resultType
- Result type token.parameters
- Parameters to include in the API call.
resultType
which contains API response
data.
FacebookException
- If an error occurs while performing the API call.@Deprecated <T> T execute(String method, String sessionKey, Class<T> resultType, Parameter... parameters)
execute(String, Class, Parameter...)
instead.
Facebook is moving to OAuth and will stop supporting the old
session key authentication scheme soon.
parameters
, mapping
the API response to a single instance of type resultType
.
T
- Java type to map to.method
- The Facebook API method to call, e.g. fql.query
.sessionKey
- A Facebook API session key if you're using the legacy API
key/Secret key authentication scheme. Must be null
if
using OAuth access token authentication.resultType
- Result type token.parameters
- Parameters to include in the API call.
resultType
which contains API response
data.
FacebookException
- If an error occurs while performing the API call.
IllegalArgumentException
- If sessionKey
is provided when using OAuth access token
authentication.<T> List<T> executeForList(String method, Class<T> resultType, Parameter... parameters)
parameters
, mapping
the API response to a List
of instances of type resultType
.
T
- Java type to map to.method
- The Facebook API method to call, e.g. fql.query
.resultType
- Result type token.parameters
- Parameters to include in the API call.
List
of instances of type resultType
which
contain API response data.
FacebookException
- If an error occurs while performing the API call.@Deprecated <T> List<T> executeForList(String method, String sessionKey, Class<T> resultType, Parameter... parameters)
executeForList(String, Class, Parameter...)
instead. Facebook is moving to OAuth and will stop supporting
the old session key authentication scheme soon.
parameters
, mapping
the API response to a List
of instances of type resultType
.
T
- Java type to map to.method
- The Facebook API method to call, e.g. fql.query
.sessionKey
- A Facebook API session key if you're using the legacy API
key/Secret key authentication scheme. Must be null
if
using OAuth access token authentication.resultType
- Result type token.parameters
- Parameters to include in the API call.
List
of instances of type resultType
which
contain API response data.
FacebookException
- If an error occurs while performing the API call.
IllegalArgumentException
- If sessionKey
is provided when using OAuth access token
authentication.<T> T executeMultiquery(Map<String,String> queries, Class<T> resultType, Parameter... additionalParameters)
fql.multiquery
API call, mapping the API response to a single
instance of type resultType
.
This method exists because the standard
execute(String, Parameter...)
and
executeForList(String, Class, Parameter...)
family of methods are
not expressive enough to handle fql.multiquery
in a non-verbose
way.
T
- Java type to map to.queries
- A mapping of query names to queries. This is marshaled to JSON and
sent over the wire to the Facebook API endpoint as the
queries
parameter.resultType
- Result type token.additionalParameters
- Additional parameters to include in the API call.
resultType
which contains API response
data.
FacebookException
- If an error occurs while performing the API call.@Deprecated <T> T executeMultiquery(Map<String,String> queries, String sessionKey, Class<T> resultType, Parameter... additionalParameters)
executeMultiquery(Map, Class, Parameter...)
instead. Facebook is moving to OAuth and will stop supporting
the old session key authentication scheme soon.
fql.multiquery
API call, mapping the API response to a single
instance of type resultType
.
This method exists because the standard
execute(String, Parameter...)
and
executeForList(String, Class, Parameter...)
family of methods are
not expressive enough to handle fql.multiquery
in a non-verbose
way.
T
- Java type to map to.queries
- A mapping of query names to queries. This is marshaled to JSON and
sent over the wire to the Facebook API endpoint as the
queries
parameter.sessionKey
- A Facebook API session key if you're using the legacy API
key/Secret key authentication scheme. Must be null
if
using OAuth access token authentication.resultType
- Result type token.additionalParameters
- Additional parameters to include in the API call.
resultType
which contains API response
data.
FacebookException
- If an error occurs while performing the API call.
IllegalArgumentException
- If sessionKey
is provided when using OAuth access token
authentication.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |