GraphResponse
有此級別的更新版本。前往查看 最新版本。

Encapsulates the response, successful or otherwise, of a call to the Facebook platform.

伸延:Object
套件:facebook
執行個體方法
getError()

Returns information about any errors that may have occurred during the request.

public final FacebookRequestError getError()
Returns
The error from the server, or null if there was no server error
getJSONObject()

The response returned for this request, if it's in object form.

public final JSONObject getJSONObject()
Returns
The returned JSON object, or null if none was returned (or if the result was a JSON array)
getJSONArray()

The response returned for this request, if it's in array form.

public final JSONArray getJSONArray()
Returns
The returned JSON array, or null if none was returned (or if the result was a JSON object)
getConnection()

Returns the HttpURLConnection that this response was generated from. If the response was retrieved from the cache, this will be null.

public final HttpURLConnection getConnection()
Returns
The connection, or null
getRequest()

Returns the request that this response is for.

public GraphRequest getRequest()
Returns
The request that this response is for
getRawResponse()

Returns the server response as a String that this response is for.

public String getRawResponse()
Returns
A String representation of the actual response from the server
getRequestForPagedResults(PagingDirection)

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. If no paging information is available, returns null.

public GraphRequest getRequestForPagedResults(PagingDirection direction)
參數說明
directionEnum indicating whether to page forward or backward
Returns
A Request that will retrieve the next page of results in the desired direction, or null if no paging information is available
常數
NON_JSON_RESPONSE_PROPERTY
Property name of non-JSON results in the GraphObject. Certain calls to Facebook result in a non-JSON response (e.g., the string literal "true" or "false"). To present a consistent way of accessing results, these are represented as a GraphObject with a single string property with this name.
public static final String NON_JSON_RESPONSE_PROPERTY
SUCCESS_KEY
public static final String SUCCESS_KEY