FQL适用于浏览器,但在Android上无效

时间:2014-05-06 13:39:16

标签: android facebook-fql

我有这个FQL查询,以获取我的所有朋友:

select name from user where uid in (select uid1 from friend where uid2=me())

这在浏览器上工作正常,传递acess_token,但是当尝试在Android中使用时,它不起作用,它返回一个空的jsonArray。这是方法:

String query = "select name from user where uid in (select uid1 from friend where uid2=me())";
        Bundle params = new Bundle();
        params.putString("q", query);
        params.putString("access_token", access_token);
        Session session = Session.getActiveSession();
        Request request = new Request(session,
            "/fql",                       
            params,                         
            HttpMethod.GET,                 
            new Request.Callback(){         
                public void onCompleted(Response response) {
                    JSONObject json;
                    json = new JSONObject();
                    json = response.getGraphObject().getInnerJSONObject();
                    Log.d("JSON_amigos", json.toString());
                }                  
        }); 
        Request.executeBatchAsync(request);

0 个答案:

没有答案