I'm trying to fetch data in my Android-App from Facebook via FQL multiquery like discribed here: http://www.kanatorn.info/2011/12/31/fql-multiple-query-android-sdk-example/
here's my code:
Bundle params = new Bundle();
JSONObject multiquery = new JSONObject();
try {
multiquery.put("query1", "SELECT eid, name, start_time, is_date_only, pic_square, pic_big, location FROM event WHERE eid IN" +
"(SELECT eid FROM event_member WHERE uid=me() AND start_time >= now()) ORDER BY start_time");
multiquery.put("query2", "SELECT eid, rsvp_status, start_time FROM event_member WHERE uid=me() AND start_time >= now() ORDER BY start_time");
} catch (JSONException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
params.putString("method", "fql.multiquery");
params.putString("queries", multiquery.toString());
Session session = Session.getActiveSession();
Request request = new Request(session,
"/fql",
params,
HttpMethod.GET,
new Request.Callback(){
public void onCompleted(Response response) {
...
}
});
Request.executeAndWait(request);
the result I'm getting is the following:
{Response: responseCode: 500, graphObject: null, error: {HttpStatus: 500, errorCode: -1, errorType: Exception, errorMessage: Unsupported method, fql.multiquery}, isFromCache:false}
I can't figure out where my mistake is. It says unsupported method, multiquery
, but this actually should be a valid method, right? I looked everywhere for a similiar problem but it seems that I'm alone with that issue.
I have the feeling that I'm missing something simple...
Would be cool if someone can help me out. Thanks!
btw. with normal queries everything works fine.
To solve this
have you read this developers page.
http://developers.facebook.com/docs/howtos/androidsdk/3.0/run-fql-queries/
Updated url