Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
397 views
in Technique[技术] by (71.8m points)

facebook - 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?

question from:https://stackoverflow.com/questions/7830846/ogurl-is-driving-me-crazy

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...