The Facebook API gives you the option of using FQL (Facebook Query Language) to retrieve data instead of using the built in API calls. I thought this was unnecessary until I needed a quick query to get me the list of a users friends with the current application added. After some research, I came across the following query:

$facebook->api_client->fql_query("SELECT uid FROM user WHERE has_added_app=1 and uid IN (SELECT uid2 FROM friend WHERE uid1 = $user)");

This returns a nice quick list I can use in the multi-friend selector for excluded IDs in the ’share’ part of the application as well as a quick number for how many friends have already added the application. This can be very useful.

QuoteShare is my new PHP Facebook application. I will be journaling several of my difficulties with this app up here on my blog. Facebook apps seem to always give me the weirdest problems available, and those are always good to share with others.

The app so far is very simple: it is scheduled to pull quotes from you and your friends’ profiles and to break them up and place just single quotes randomly on your profile in the QuoteShare box. Check out the screen shot below.

QuoteShare