UPDATE Query in FQL

Today, I have seen a post in the Facebook Dev Forum asking is it possible to write FQL statement to update data in Facebook.

“No” – this is the answer that comes into my mind right after seeing the post…. According to the documentation of FQL,

Facebook Query Language, or FQL, enables you to use a SQL-style interface to query the data exposed by the Graph API. It provides for some advanced features not available in the Graph API, including batching multiple queries into a single call.

You can execute FQL queries by fetching https://api.facebook.com/method/fql.query?query=QUERY. You can specify a response format as either XML or JSON with the format query parameter.

Queries are of the form SELECT [fields] FROM [table] WHERE [conditions]. Unlike SQL, the FQL FROM clause can contain only a single table. You can use the IN keyword in SELECT or WHERE clauses to do subqueries, but the subqueries cannot reference variables in the outer query’s scope. Your query must also be indexable, meaning that it queries properties that are marked as indexable in the documentation below.

After reply the post in the forum, I ask myself, “why Facebook does not provide an UPDATE statement?”

  • Is this because of authorization and authentication issue?
    may be… but… even for query statement, Facebook has still handle the authorization and authentication issue… so probably this is not the major issue

Of course, only Facebook can tell the truth… may be this is because of its complexity (as I think there may be fields that users are not allowed to update).

This entry was posted in Facebook Dev Forum Digest and tagged . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *