public interface GraphApi
Modifier and Type | Field and Description |
---|---|
static String |
GRAPH_API_URL
Deprecated.
Use getBaseGraphApiUrl() instead.
|
Modifier and Type | Method and Description |
---|---|
void |
delete(String objectId)
Deletes an object.
|
void |
delete(String objectId,
String connectionName)
Deletes an object connection.
|
void |
delete(String objectId,
String connectionName,
MultiValueMap<String,String> data)
Deletes an object connection.
|
<T> PagedList<T> |
fetchConnections(String objectId,
String connectionName,
Class<T> type,
MultiValueMap<String,String> queryParameters)
Fetches connections, extracting them into a collection of the given Java type
Requires appropriate permission to fetch the object connection.
|
<T> PagedList<T> |
fetchConnections(String objectId,
String connectionName,
Class<T> type,
MultiValueMap<String,String> queryParameters,
String... fields)
Fetches connections, extracting them into a collection of the given Java type
Requires appropriate permission to fetch the object connection.
|
<T> PagedList<T> |
fetchConnections(String objectId,
String connectionName,
Class<T> type,
String... fields)
Fetches connections, extracting them into a collection of the given Java type
Requires appropriate permission to fetch the object connection.
|
byte[] |
fetchImage(String objectId,
String connectionName,
ImageType imageType)
Fetches an image as an array of bytes.
|
byte[] |
fetchImage(String objectId,
String connectionName,
Integer width,
Integer height)
Fetches an image as an array of bytes.
|
<T> T |
fetchObject(String objectId,
Class<T> type)
Fetches an object, extracting it into the given Java type
Requires appropriate permission to fetch the object.
|
<T> T |
fetchObject(String objectId,
Class<T> type,
MultiValueMap<String,String> queryParameters)
Fetches an object, extracting it into the given Java type
Requires appropriate permission to fetch the object.
|
<T> T |
fetchObject(String objectId,
Class<T> type,
String... fields)
Fetches an object, extracting it into the given Java type
Requires appropriate permission to fetch the object.
|
String |
getApplicationNamespace() |
String |
getBaseGraphApiUrl() |
void |
post(String objectId,
MultiValueMap<String,Object> data)
Publishes data to an object.
|
void |
post(String objectId,
String connectionName,
MultiValueMap<String,Object> data)
Publishes data to an object's connection.
|
String |
publish(String objectId,
String connectionName,
MultiValueMap<String,Object> data)
Publishes data to an object's connection.
|
@Deprecated static final String GRAPH_API_URL
<T> T fetchObject(String objectId, Class<T> type)
T
- The Java type to bind the Facebook object toobjectId
- the Facebook object's IDtype
- the Java type to fetch<T> T fetchObject(String objectId, Class<T> type, String... fields)
T
- The Java type to bind the Facebook object toobjectId
- the Facebook object's IDtype
- the Java type to fetchfields
- the fields to include in the response.<T> T fetchObject(String objectId, Class<T> type, MultiValueMap<String,String> queryParameters)
T
- The Java type to bind the Facebook object toobjectId
- the Facebook object's IDtype
- the Java type to fetchqueryParameters
- query parameters to include in the request<T> PagedList<T> fetchConnections(String objectId, String connectionName, Class<T> type, String... fields)
T
- The Java type to bind the Facebook object toobjectId
- the ID of the object to retrieve the connections for.connectionName
- the connection name.type
- the Java type of each connection.fields
- the fields to include in the response.<T> PagedList<T> fetchConnections(String objectId, String connectionName, Class<T> type, MultiValueMap<String,String> queryParameters)
T
- The Java type to bind the Facebook object toobjectId
- the ID of the object to retrieve the connections for.connectionName
- the connection name.type
- the Java type of each connection.queryParameters
- query parameters to include in the request<T> PagedList<T> fetchConnections(String objectId, String connectionName, Class<T> type, MultiValueMap<String,String> queryParameters, String... fields)
T
- The Java type to bind the Facebook object toobjectId
- the ID of the object to retrieve the connections for.connectionName
- the connection name.type
- the Java type of each connection.queryParameters
- query parameters to include in the requestfields
- the fields to include in the response.byte[] fetchImage(String objectId, String connectionName, ImageType imageType)
objectId
- the object IDconnectionName
- the connection nameimageType
- the type of image to retrieve (eg., small, normal, large, or square)byte[] fetchImage(String objectId, String connectionName, Integer width, Integer height)
objectId
- the object IDconnectionName
- the connection namewidth
- desired width of the image (optional)height
- desired height of the image (optional)String publish(String objectId, String connectionName, MultiValueMap<String,Object> data)
objectId
- the object ID to publish to.connectionName
- the connection name to publish to.data
- the data to publish to the connection.void post(String objectId, MultiValueMap<String,Object> data)
objectId
- the object ID to publish to.data
- the data to publish to the object.void post(String objectId, String connectionName, MultiValueMap<String,Object> data)
objectId
- the object ID to publish to.connectionName
- the connection name to publish to.data
- the data to publish to the connection.void delete(String objectId)
objectId
- the object IDvoid delete(String objectId, String connectionName)
objectId
- the object IDconnectionName
- the connection namevoid delete(String objectId, String connectionName, MultiValueMap<String,String> data)
objectId
- the object IDconnectionName
- the connection namedata
- parameters for the delete requestString getApplicationNamespace()
String getBaseGraphApiUrl()