The current Facebook API v3.0.2.b will return a com.facebook.Response object that holds the response. Do you know how to parse this? The following code will raise an Exception 🙁
//execute the request
Request request = new Request
(
session,
"/fql",
params,
HttpMethod.GET,
new Request.Callback()
{
@Override
public void onCompleted( Response response )
{
try
{
JSONArray json = new JSONArray( response.toString() );
}
catch ( Throwable t )
{
System.err.println( t );
}
}
}
);
Request.executeBatchAsync( request );
The error message says:
org.json.JSONException: Unterminated object at character 25 of {Response: responseCode: 200, graphObject: GraphObject{graphObjectClass=GraphObject, state={"data":[{"pic_square":.....
Does anybody know what’s the correct solution? Shall I use
GraphObject go = response.getGraphObject();
.. how can I get GraphUser-Objects with that?
Sorry, this seems like a trivial issue but processing the Response-object is poorly documented in the facebook docs and I wasn’t able to receive anything about this on the web 🙁
Thank you very much in advance!
Greetings Christopher
this is the solution that worked for me –
I had to investigate the response and play around a bit with some methods but finally solved it 🙂
Hope this helps anybody someday.
Greetings
Christopher
UPDATE
GraphObject is no longer a class, so just: