Hacker News new | ask | show | jobs
by anilchawla 5589 days ago
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 when the underlying data is unreliable. Any thoughts or similar experiences with the Facebook API?
7 comments

So this is how Breakup Notifier does it. It checks to see that the data is there. If at any point in time, the data I'm looking for is unavailable, I mark that field as "stale", don't vouch for the validity of its contents, and remove the ability for the user of the app to view that data.

When it comes back online, I mark it as not stale, and if it differs from the previous (non-stale) version, I send out an email.

Gotcha. I thought you might report updates only. The problem is that people can also remove their status instead of setting it back to "Single". Focusing on value updates only is probably fine and I'm sure nobody is going to freak out if the app misses a breakup :-P In my case, I was trying to create a more comprehensive notification that covered events such as new relationships (i.e. the user does not have a relationship status and one day finally sets it) and I couldn't afford the false positives.
We just work with the API within the usual scope (fb connect, etc) but it breaks regularly and things sometimes change without notice. It's really a joke for a company of that size. It has become kind of a running gag in the office (like: "Skip the tests, just release it. Today we do it facebook-style")
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.

We run a program that monitors a significant number of Facebook Pages. It drives me crazy because every once in a while a certain attribute, like the author, is just omitted. It'll usually show up again later on.
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).
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...

Thanks for sharing. Your insights & warnings have been most helpful.