Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

og:url is driving me crazy?

hope you can help me...

I want to have a page with facebook metatags, like:

<meta property="og:title" content="TITULO" />
<meta property="og:type" content="website" />       
<meta property="og:image" content="http://profile.ak.fbcdn.net/hprofile-ak-snc4/277072_61646342824_993843268_n.jpg" />      
<meta property="og:url" content="http://www.clarin.com" />

and the problem is that instead of showing the descriptions, titles and images that I define in the metatags of my page, the facebook like box is generated with the url defined in my og:url. I was reading documentation and it seems that it should be in that way.

But I still want the facebook like box generated only with the metatags of my page, and not with the url defined in og:url.

is it possible? someone has done?

like image 717
Juan Pérez Avatar asked Oct 20 '11 03:10

Juan Pérez


2 Answers

og:url basically tells the FB scraper "ignore anything on this page, and scrape this url instead" So it's doing exactly what it's supposed to do. If you want the like button to point to a different url, use the href parameter and have it point to a different url.

See https://developers.facebook.com/docs/reference/plugins/like/ for more information.

like image 62
Jeff Sherlock Avatar answered Oct 11 '22 00:10

Jeff Sherlock


I think I understand what you are asking. Like @Jeff Sherlock said "og:url basically tells our scraper "ignore anything on this page, and scrape this url instead"..."

So if og:url is anything other than the current page -- Facebook will try to scrape the open graph data from there instead.

If this is a page you are trying to send people to if they click on the 'like object' that is posted to a users wall (who has already liked your page) --

I made a tool for this exact purpose -- as I thought it might be helpful to others:

Facebook/Open Graph Like button Generator

It generates (and stores) the open graph tag(s) so you don't need to put them in your page at all and the 'Redirect URL' tells it where to send all the traffic.

It detects the Facebook bot/scraper too so it won't interfere with anything :)

Good luck

like image 22
Ariel Avatar answered Oct 11 '22 00:10

Ariel