To use Facebook’s graph search, you need to register first as a developer and then create an app on the Facebook developer site. Once you have done this, you need to identify the following values for your app: App ID & App Secret. You’ll find this information on your application’s basic information page.
Now, to get Jaql to use it and search Facebook graph:
term = “Facebook+graph”;
url = “https://graph.facebook.com/search?q=” + term + “&access_token=MY_APP_ID%7CMY_APP_SECRET”;
results = read(http(url));
Replace MY_APP_ID with your application’s ID and MY_APP_SECRET with your application’s secret string.
Please note: the %7C found between MY_APP_ID and MY_APP_SECRET is required; the pipe character is considered insecure and your Jaql script will fail as a result. The error will be:
java.net.URISyntaxException: Illegal character in query at index ##
You’ll now be able to work with the json data produced by the query.