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

This mod is pretty easy. All it requires is a template change to add in the image location for the thumbnail API and a new cell in the table. Open up your link.tpl file for the phpLD theme you are using. Near the top of the template, right after the table and first row are opened (<table><tr>) add the following:

<td style="height: 90px; width: 120px">
<img src="http://www.artviper.net/screenshots/screener.php?url={$link.URL|escape|trim}"
alt="Thumbnail" />
</td>

That should be it! The thumbnails take a bit to be cached, but after they’re loaded once they should load quickly.