当前的 Facebook API v3.0.2.b 将返回一个包含响应的 com.facebook.Response 对象。你知道如何解析这个吗?以下代码将引发异常:(
//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 );
错误消息说:
org.json.JSONException: Unterminated object at character 25 of {Response: responseCode: 200, graphObject: GraphObject{graphObjectClass=GraphObject, state={"data":[{"pic_square":.....
有谁知道正确的解决方案是什么?我要不要用
GraphObject go = response.getGraphObject();
..我怎样才能得到GraphUser-Objects?
抱歉,这似乎是一个微不足道的问题,但在 facebook 文档中处理响应对象的记录很差,我无法在网络上收到任何关于此的信息 :(
非常感谢您!
问候克里斯托弗