dimanche 19 avril 2015

Stop Facebook probing a site for content with PHP

Okay, so when you post a link on Facebook, it does a quick scan of the page to find images and text etc. to create a sort of preview on their site. I'm sure other social networks such as Twitter do much the same, too.


Anyway, I created a sort of "one time message" system, but when you create a message and send the link in a chat on Facebook, it probes the page and renders the message as "seen".


I know that the Facebook probe has a user agent of facebookexternalhit/1.1 (+http://ift.tt/QzhITw), so I could just block all requests from anything with that user agent, but I was wondering if there's a more efficient way of achieving this with all sites that "probe" links for content?


Aucun commentaire:

Enregistrer un commentaire