Home > Paid Traffic Sources > Facebook & Instagram

Spoofing FB OG tag info (4)


08-11-2016 10:45 AM #1 ploppythejailer (Member)
Spoofing FB OG tag info

This question isn't related to FB Ads but actual posts!

Does anyone have an idea how to spoof/fake the og tags that a displayed when posting in FB? I see a lot of people doing it but can't figure out how, i'm thinking some cloaking/javascript diggery-pokery.

Anyone point me in the right direction? Looking to test something out


08-11-2016 04:42 PM #2 bobliu (Member)

Do you mean just setting the meta information?

<meta property="og:title" content="Facebook Open Graph META Tags"/>
<meta property="og:image" content="https://davidwalsh.name/wp-content/themes/klass/img/facebooklogo.png"/>
<meta property="og:site_name" content="David Walsh Blog"/>
<meta property="og:description" content="Facebook's Open Graph protocol allows for web developers to turn their websites into Facebook "graph" objects, allowing a certain level of customization over how information is carried over from a non-Facebook website to Facebook when a page is 'recommended', 'liked', or just generally shared."/>
Or cloaking the actual fb crawler?
if ( strpos($_SERVER["HTTP_USER_AGENT"], "facebookexternalhit/") !== false || strpos($_SERVER["HTTP_USER_AGENT"], "Facebot") !== false) {
// Facebook bots see this
echo " hello bot ";
}
else {
// Other visitors see this
echo " hello real user ";
}


08-11-2016 08:08 PM #3 ploppythejailer (Member)

Thanks for the reply bobliu!

What i mean is faking/spoofing the fb preview data..

A while back you used to be able to set og:url, title, image, description to anything you wanted and fb would show whatever you told it, so you could have the domain showing as cnn.com and then use any image/title/description you wanted.

but now if you use the og:url tag FB will use that url and take everything from that page overriding any other tags you use..

But there is way to spoof this somehow (ive seen people doing it) but cant figure out how they are doing it, im told its a mix of cloaking and js


08-13-2016 06:57 PM #4 zeno (Administrator)

To the best of my knowledge the OG tags just are what they are. You have always been able to set them to control share previews.

Why not just use PHP or similar to insert meta info A or B depending on some rules?

Not quite sure what the objective is here.


Home > Paid Traffic Sources > Facebook & Instagram