SQLAuthority News – FQL – Facebook Query Language

I was exploring the new hype today, I found Facebook Developers Documentation very interesting. Facebook API can be queries using FQL – Facebook Query Language, which is similar to SQL.

Facebook list following advantages of FQL:

  • Condensed XML reduces bandwidth and parsing costs.
  • More complex requests can reduce the number of requests necessary.
  • Provides a single, consistent, unified interface for all of your data.
  • It’s fun!

SQLAuthority News - FQL - Facebook Query Language facebookdevelopers

A sample query in FQL looks like

SELECT concat(first_name, substr(last_name, 0, 1), " is from "
UPPER(hometown_location.city), ", yo", status
FROM USER
WHERE uid IN (
SELECT uid2
FROM friend
WHERE uid1 = [uid])
AND strlen(hometown_location.city) > 0
AND status.time > now() - 3600*6

Refer the FQL documentation for table list, which can be used in FROM clause for query as well functions and operators allowed in FQL. FQL does not support complex tables, joins yet. I am quite impressed with the new attempt to have SQL like query in Facebook.

UPDATE (As per Facebook): On August 17, 2016, FQL will no longer be available and cannot be queried. To migrate your app, use theAPI Upgrade Tool to see the Graph API calls you can make instead.

Reference : Pinal Dave (https://blog.sqlauthority.com)

, ,
Previous Post
SQL SERVER – Fix : Error Msg 1813, Level 16, State 2, Line 1 Could not open new database ‘yourdatabasename’. CREATE DATABASE is aborted.
Next Post
SQL SERVER – UDF – Get the Day of the Week Function

Related Posts

2 Comments. Leave new

  • Grant Czerepak
    July 24, 2007 8:10 am

    I think the FQL idea is great. Facebook has done wonders by creating an interface that uses a common metaphor.

    Reply
  • Hi
    I want to execute FQL from .net application which is not integrated in Facebook.

    is this possible ?

    thanking you,

    Laxmikant

    Reply

Leave a Reply

Menu