Running multiple FQL queries #39

Closed
raffael opened this Issue Sep 1, 2012 · 1 comment

Projects

None yet

2 participants

@raffael
raffael commented Sep 1, 2012

With the new changes in the Graph API, FQL queries can now be made using the graph.facebook.com instead of api.facebook.com. The sendFQLRequest should be rewritten to implement that change.

Additionally, multiple queries can now be executed at once using braces notation:

graph.facebook.com/fql?q={"user+info":"SELECT … ","photo+info":"SELECT …"}

Currently, sending requests containing {, } or _ (Space) with PhFacebook result in empty result strings. To fix that, the following code can be used:

NSString *fqlQuery = @"fql?q={"...":"…", ...}";
NSString *properlyEncodedString = [fqlQuery stringByAddingPercentEscapesUsingEncoding: NSUTF8StringEncoding];

The properlyEncodedString now results in correct Graph results.

@philippec
Owner

If you have a code fix that can allow both single and multiple queries at the same time, send a pull request and I'll review it. Thanks!

@philippec philippec closed this Jan 19, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment