public class GraphResponse
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static class |
GraphResponse.PagingDirection
Indicates whether paging is being done forward or backward.
|
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
NON_JSON_RESPONSE_PROPERTY
Property name of non-JSON results in the GraphObject.
|
static java.lang.String |
SUCCESS_KEY |
| Constructor and Description |
|---|
GraphResponse(GraphRequest request,
java.net.HttpURLConnection connection,
FacebookRequestError error) |
GraphResponse(GraphRequest request,
java.net.HttpURLConnection connection,
java.lang.String rawResponse,
org.json.JSONArray graphObjects) |
GraphResponse(GraphRequest request,
java.net.HttpURLConnection connection,
java.lang.String rawResponse,
org.json.JSONObject graphObject) |
| Modifier and Type | Method and Description |
|---|---|
java.net.HttpURLConnection |
getConnection()
Returns the HttpURLConnection that this response was generated from.
|
FacebookRequestError |
getError()
Returns information about any errors that may have occurred during the request.
|
org.json.JSONArray |
getJSONArray()
The response returned for this request, if it's in array form.
|
org.json.JSONObject |
getJSONObject()
The response returned for this request, if it's in object form.
|
java.lang.String |
getRawResponse()
Returns the server response as a String that this response is for.
|
GraphRequest |
getRequest()
Returns the request that this response is for.
|
GraphRequest |
getRequestForPagedResults(GraphResponse.PagingDirection direction)
If a Response contains results that contain paging information, returns a new
Request that will retrieve the next page of results, in whichever direction
is desired.
|
java.lang.String |
toString()
Provides a debugging string for this response.
|
public static final java.lang.String NON_JSON_RESPONSE_PROPERTY
public static final java.lang.String SUCCESS_KEY
public GraphResponse(GraphRequest request, java.net.HttpURLConnection connection, java.lang.String rawResponse, org.json.JSONObject graphObject)
public GraphResponse(GraphRequest request, java.net.HttpURLConnection connection, java.lang.String rawResponse, org.json.JSONArray graphObjects)
public GraphResponse(GraphRequest request, java.net.HttpURLConnection connection, FacebookRequestError error)
public final FacebookRequestError getError()
public final org.json.JSONObject getJSONObject()
public final org.json.JSONArray getJSONArray()
public final java.net.HttpURLConnection getConnection()
public GraphRequest getRequest()
public java.lang.String getRawResponse()
public GraphRequest getRequestForPagedResults(GraphResponse.PagingDirection direction)
direction - enum indicating whether to page forward or backwardpublic java.lang.String toString()
toString in class java.lang.Object