Mild Fuzz
Mild Fuzz

Reputation: 30731

How can I tell if a piece of traffic is Facebook?

I am trying to get my meta tags right for certain pages, and in order to do that I need to trick facebook into reading a different header.

How can I detect if user is infact Facebook's spider/crawler on the prowl for meta tags?

Upvotes: 4

Views: 210

Answers (1)

boug
boug

Reputation: 1877

the $_SERVER['HTTP_USER_AGENT'] variable tells you that. It's usually something like this facebookexternalhit/1.0 ( http://www.facebook.com/externalhit_uatext.php) if it is facebook reading your site

Upvotes: 4

Related Questions