Accessing Facebook Graphs search from Jaql

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 = “” + 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: Illegal character in query at index ##

You’ll now be able to work with the json data produced by the query.

This entry was posted in Uncategorized and tagged , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s