Is it just me or does this API have way too many bugs? Latest of which is:
Or GET /me/checkins?limit=100
You would think this is supposed to return 100 of my last check-ins right? Wrong! First up, it returns nowhere the right amount of check-ins. I’ve asked for 100 and it arbitrarily cuts off at some point in 2011 and gives me a link to the next “page”. As if this wasn’t annoying enough, following the link and opening the next page doesn’t work either because .. who knows right? And just to be sure, the cut-off isn’t because I don’t have any more check-ins before that date. Oh, and it doesn’t return any check-ins that have pictures attached (see below for a more detailed explanation).
So now you’re about to say, “But ah, you have FQL! Use the right tools!”. I’d hate to blow your bubble, but FQL isn’t an angel either. Lets dig deeper. On the face of it, you’d think you can get all the data you need by executing
SELECT * FROM checkin WHERE author_uid IN (SELECT uid2 FROM friend WHERE uid1=me())
This doesn’t work. For whatever business reasons, if I click the check-in button on my iPhone app, pick a location, tag some friends and add a photo to it, facebook internally treats it as a photo with an attached location attached rather than a check-in with a photo. So there’s no entry in the check-in table when I specifically click the check-in button on the facebook app to post an update. Right. As an aside, why doesn’t SELECT * work facebook? Can we atleast have this as a part of the Graph API explorer?
A little more research and you find this tiny gem called location_post. This supposedly contains all the posts from a user that have locations attached to them. Here you have a type column that determines if it’s a check-in or a photo or a status update etc. This, by and large works pretty well, except when a user chooses to upload a whole album of photos and picks a single location for all the 100 photos they’ve just uploaded. Then it spams your results with 100 separate entries in your results. One for each of the photos. Minor inconvenience, but I guess you can live with this. So, you use some client side code filter duplicates. (Same user, >2 posts at the same location? Remove all of ’em).
Next up, you realize that location_post doesn’t return check-ins if a friend has been tagged at a location by a user who is not your friend. Facebook says this is for privacy reasons, and there is a bug report filed, but it seems to have been closed and is not being followed up.
On the whole, this has been a pretty frustrating experience, but I think I see the light at the end of the tunnel now. Thoughts?