from Hacker News

Undocumented Facebook API to identify friends in photos

by vanwilder77 on 6/4/16, 4:30 PM with 34 comments

  • by gcr on 6/4/16, 5:07 PM

    Yup yup! This was the screenscraping technique we used to turn Facebook into an automatic face detector: https://arxiv.org/abs/1602.04504

    It's a giant pain to screenscrape this using 'curl'. If I recall correctly, the bounding box coordinates I wanted are set as CSS properties inside inline HTML sent to the client wrapped up in a Javascript string literal as part of Javascript served to the client as the result of an AJAX call, if memory serves correctly. To get my screenscraper working, I had to do the AJAX call, parse the literal javascript, walk the AST to find the string literal I needed, parse the HTML to find the element I needed, then use the computed CSS properties. Looks like the author of this post found a much nicer way.

    (note: that work wasn't about recognition; it was about just finding the faces in images, not identifying them)

  • by bjt2n3904 on 6/5/16, 2:13 AM

    I've never liked Facebook's "do you want to tag your friend" feature. It's a loaded question, like... have you stopped beating your wife? However you answer it, you've given Facebook feedback about their facial recognition.

    If I hit yes, I'm tagging friends who might not want to be tagged. Furthermore, I might end up in the same boat with friends tagging pictures of me! Either way, I help better Facebook's facial recognition, which unnerves me.

    On the surface, clicking "no" means that they got the facial recognition wrong. But what am else am I revealing? If the match was 98%, would they infer that one of us (or both) is concerned about privacy? That we have something to hide?

    The third alternative is to click nothing. The only information that gives Facebook is that I'm not interested in helping curate their data any more than I already am.

  • by johansch on 6/4/16, 6:45 PM

    The title (and half of the post) seems to say that there is some undocumented API that can do more than what the actual Facebook service does with its regular usage. This does not seem to be the case.
  • by dimino on 6/4/16, 7:41 PM

    This is great! I tended to favor this technique for testing during my time in QA automation.

    People gravitate towards Selenium too quickly, when you really only need Selenium to test rendering.

  • by Tinyyy on 6/5/16, 11:32 AM

    Is there a way to get the position (coordinates) of the face as well, just like it is on Facebook?
  • by fallenshell on 6/4/16, 5:15 PM

    This is scary.