« MapYourBuddies Current State & Friends List | Main | The ultimative Google Maps "Mashup" - "Made in Germany" - Powered by BMW ;) »

MapYourBuddies: Social SQL with FQL ...

While I was catching up my news feeds from the Winter Break, I found this interesting article on blog.programmableweb.com: "Social SQL with FQL: the Facebook Query Language".

Now Facebook offers in addition to the API another data access mechanism: the Facebook Query Language. This allows you for example to access data in this format:

SELECT name, pic FROM user WHERE uid=211031 OR uid=4801660

And even more complex queries are possible:

SELECT name, affiliations FROM user WHERE uid IN ( SELECT uid2 FROM friend WHERE uid1=211031) AND "Facebook" IN affiliations.name AND uid < 10

Or:

SELECT src, caption, 1+2*3/4, caption, 10*(20 + 1) FROM photo WHERE pid IN ( SELECT pid FROM photo_tag WHERE subject=211031) AND pid IN ( SELECT pid FROM photo_tag WHERE subject=204686) AND caption

And the best thing is, you get the results back as XML stream !!!

More Details can be found in the Facebook documentation. And FQL exampels can be found here.

I thought this might be an interesting addition to Bud's Post "Map Your Buddies Catching a Trend?" ;)

-Joern