SQLAuthority News – FQL – Facebook Query Language

I was exploring the new hype (promoted by Robert Scoble heavily) today, I found Facebook Developers Documentation very interesting. Facebook API can be queries using FQL – Faceboook 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!

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.

Reference : Pinal Dave (http://blog.SQLAuthority.com)

About these ads

3 thoughts on “SQLAuthority News – FQL – Facebook Query Language

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

    is this possible ?

    thanking you,

    Laxmikant

  2. Pingback: SQL SERVER – Weekly Series – Memory Lane – #039 | Journey to SQL Authority with Pinal Dave

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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 )

Google+ photo

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

Connecting to %s