Live data from Hacker News

One long, intimate month with the Facebook API

anilchawla.org

21–28 of 28 posts

Re: One long, intimate month with the Facebook API

#21
I tried to integrate my site, Scribophile, with FB a few years ago when the API was still relatively new. The idea was to give the user the option of adding a wall post to their profile when they posted writing to the site.

The API had the exact same problems then... unanswered questions, confusing documentation, complex code examples. Something that seemed so simple--post a link to someone's wall, with their permission--turned into a multi-day codefest. But I finally got it working!

Until one day a few months later, when the API changed without warning. And that's what I think the biggest problem with the FB API is... they (at least back in the day) change it constantly, without much warning, and don't update documentation in a sane way. It's impossible to build once and forget.

I finally got a complaint from a user one day that the FB integration wasn't working. When I went in to check the code, I found that FB had almost completely changed their JS libraries and made significant API changes. Instead of going through that hell again, I just removed the feature.

Re: One long, intimate month with the Facebook API

#22

I should say that I've been lurking on HN for quite some time and that this is my first post :-) One motivation for writing this post was that I was surprised to see how often the Facebook API will drop/omit data that exists and that you should be able to access. I specifically call out the Breakup Notifier app (which recently got a ton of buzz) because I don't see how apps like that can report accurate information w…

One motivation for writing this post was that I was surprised to see how often the Facebook API will drop/omit data that exists and that you should be able to access.

I loved the article, but I'm a bit surprised that you're surprised. What else would you expect from a massive NoSQL installation? It seems to me a given that they are going to trade some data integrity (in the form of missing attributes) for speed of access. I'd assume that was a fundamental design goal of the architecture.

Re: One long, intimate month with the Facebook API

#24

I should say that I've been lurking on HN for quite some time and that this is my first post :-) One motivation for writing this post was that I was surprised to see how often the Facebook API will drop/omit data that exists and that you should be able to access. I specifically call out the Breakup Notifier app (which recently got a ton of buzz) because I don't see how apps like that can report accurate information w…

Well, the graph API reports things as JSON. Your app has to page through the resulting json and see what information is relevant and meaningful.

I'm barely starting the Facebook API but the solution I'll use is to put the code for interpretating a given query into a series of configuration files using a DSL to interpret the Json. It's mostly a series of entries like:

    foo = [bar or baz or "default"] 
This way any change in graph structure can be dealt with quickly (this would be a problem for XML/XSLT except they are too slow AND they don't do incremental interpretation).

Re: One long, intimate month with the Facebook API

#25

I should say that I've been lurking on HN for quite some time and that this is my first post :-) One motivation for writing this post was that I was surprised to see how often the Facebook API will drop/omit data that exists and that you should be able to access. I specifically call out the Breakup Notifier app (which recently got a ton of buzz) because I don't see how apps like that can report accurate information w…

Regarding the Breakup Notifier reliability: "I had my boyfriend test it out by changing his status several times waiting about 10 minutes in between, and I never received an email notification. The site supposedly crawls Facebook every ten minutes for changes so it shouldn’t take long to be notified."

http://datingdissection.com/2011/02/21/breakup-notifier-make...

Re: One long, intimate month with the Facebook API

#26
I'm the developer of Clarity (clarity-app.com), a Facebook Client for the Mac and I've had a similar experience. Here's another couple of things that are weird.

- you can't like pictures or even see likes for pictures

- you can't post on your wall if the attached image is located in your fcebook album: so if you want to post an image you have to upload it somewhere else.

- you can't rename friend lists

- lots of things are inaccessible if your friends have strict security settings (like their birthday, or their name)

- as outlined in the article: the notification data structure is a train wreck

- you can't approve friend requests

- some parts of the API are not documented at all, like the 'attachment' field on the posts table: it contains a dictionary, but in order to understand the keys and values you have to read the raw data from lots of posts, and even then you never know if one future entry breaks your app.

- and much more

One problem I had was that users expected much of this to work because it works on the Facebook iPhone app too. But that one is official and does not need to use the limited app API.

Re: One long, intimate month with the Facebook API

#27

I'm the developer of Clarity (clarity-app.com), a Facebook Client for the Mac and I've had a similar experience. Here's another couple of things that are weird. - you can't like pictures or even see likes for pictures - you can't post on your wall if the attached image is located in your fcebook album: so if you want to post an image you have to upload it somewhere else. - you can't rename friend lists - lots of thin…

Great list of additional restrictions/shortcomings. I forgot to mention that you can't post a photo that is hosted on the Facebook CDN - that is really annoying.

Re: One long, intimate month with the Facebook API

#28
I can understand all the complains about the facebook api, and they're all very valid, but my use of the facebook javascript API's have been relatively easy, to be honest. The documentation is far from ideal, and you have to figure stuff out by reading the actual response codes instead of trusting the documentation, but in general it all seems to work.

I am just wall posting and uploading photos though, and not doing any real data retrieval. Maybe facebook is more focussed on API's that put stuff in instead of taking things out? ;)

Post reply on HN