rain13 Posted August 27, 2014 Share Posted August 27, 2014 Hello.I am trying to specify title, description and image for facebook but my meta tags doesnt work. Any ideas? <!DOCTYPE html><html xmlns:og="http://ogp.me/ns#"><head><title>My site</title><meta http-equiv="content-type" content="text/html; charset=UTF-8"/><meta name="title" property="og:title" content="Sample Title" /><meta property="og:description" content="Sample description"><meta name="image" property="og:image" content="http://yourshot.nationalgeographic.com/u/fQYSUbVfts-T7pS2VP2wnKyN8wxywmXtY0-Fwsgxpi9nxv4XgGwfeKJsnYs5NUij4X_IUIoAtrPnX5kIWmikYF2fp9MR1wTT8DH1JuGe8-qJ4ViHJFrUagMIMF1Fwhe5fbvmiGNAeW2Xike1jpziMjSlaHgOb0zmJoVaIURenAHffRuupC4qC0yZ0BDe54LdFPEmracDkoMviXxV/" /><!--main.html--></head><body>content</body></html> Link to comment Share on other sites More sharing options...
Wolverine Posted August 27, 2014 Share Posted August 27, 2014 Well according to the w3c validator:Validation Output: 3 Errors [*]Line 2, Column 35: Attribute xmlns:og not allowed here.<html xmlns:og="http://ogp.me/ns#">✉[*]Line 2, Column 35: Attribute with the local name xmlns:og is not serializable as XML 1.0.<html xmlns:og="http://ogp.me/ns#">✉[*]Line 6, Column 64: Bad value title for attribute name on element meta: Keyword title is not registered.<meta name="title" property="og:title" content="Sample Title" />Syntax of metadata name:A metadata name listed in the HTML specification or listed in the WHATWG wiki. You can register metadata names on the WHATWG wiki yourself. [*]Line 8, Column 302: Bad value image for attribute name on element meta: Keyword image is not registered.…SlaHgOb0zmJoVaIURenAHffRuupC4qC0yZ0BDe54LdFPEmracDkoMviXxV/" /><!--main.html-->Syntax of metadata name:A metadata name listed in the HTML specification or listed in the WHATWG wiki. You can register metadata names on the WHATWG wiki yourself. what it should look like is: <!DOCTYPE html><html><head><title>My site</title><meta http-equiv="content-type" content="text/html; charset=UTF-8"/><meta property="description" content="Sample description"><!--main.html--></head><body>content<img src="http://yourshot.nationalgeographic.com/u/fQYSUbVfts-T7pS2VP2wnKyN8wxywmXtY0-Fwsgxpi9nxv4XgGwfeKJsnYs5NUij4X_IUIoAtrPnX5kIWmikYF2fp9MR1wTT8DH1JuGe8-qJ4ViHJFrUagMIMF1Fwhe5fbvmiGNAeW2Xike1jpziMjSlaHgOb0zmJoVaIURenAHffRuupC4qC0yZ0BDe54LdFPEmracDkoMviXxV/" alt="" ></body></html> Link to comment Share on other sites More sharing options...
dsonesuk Posted August 27, 2014 Share Posted August 27, 2014 Those og: meta tags are required for facebook likes For old Transitional doctype to make og validate you would place these facebook meta tags within html comment. <!--<meta name="title" property="og:title" content="Sample Title" /><meta property="og:description" content="Sample description"><meta name="image" property="og:image" content="http://yourshot.nationalgeographic.com/u/fQYSUbVfts-T7pS2VP2wnKyN8wxywmXtY0-Fwsgxpi9nxv4XgGwfeKJsnYs5NUij4X_IUIoAtrPnX5kIWmikYF2fp9MR1wTT8DH1JuGe8-qJ4ViHJFrUagMIMF1Fwhe5fbvmiGNAeW2Xike1jpziMjSlaHgOb0zmJoVaIURenAHffRuupC4qC0yZ0BDe54LdFPEmracDkoMviXxV/" />--> Facebook will still read these, but when you validate it would be ignored and pass. So if it works for Transitional, might be option for HTML5 doctype. Link to comment Share on other sites More sharing options...
rain13 Posted August 27, 2014 Author Share Posted August 27, 2014 Thanks. So if I want to share instead of like then I need something else? Link to comment Share on other sites More sharing options...
dsonesuk Posted August 27, 2014 Share Posted August 27, 2014 facebook retrieve information about specific page, to show specific details using these tags, so sharing is part of it. checkout https://developers.facebook.com/docs/opengraph/howtos/maximizing-distribution-media-content give deatails of setting up and checking. Link to comment Share on other sites More sharing options...
rain13 Posted August 27, 2014 Author Share Posted August 27, 2014 thanks Link to comment Share on other sites More sharing options...
rain13 Posted August 27, 2014 Author Share Posted August 27, 2014 fb:app_id – The unique ID that lets Facebook know the identity of your site. This is crucial for Facebook Insights to work properly. Please see our Insights documentation to learn more. Do I have to specify this or is it something I can specify if I want? Link to comment Share on other sites More sharing options...
dsonesuk Posted August 27, 2014 Share Posted August 27, 2014 The facebook app id was optional, but recommended, because it may become required in the future. The facebook insight is optional it just give general details on user location, gender, page visit etc. Link to comment Share on other sites More sharing options...
rain13 Posted August 28, 2014 Author Share Posted August 28, 2014 (edited) Thanks.Could anyone look at og tags http://autoit.net.ee/pub/?p=241 and tell me why it doesn't display large image?I want it to look like: If I share my photo it looks small :(However the image linked in meta tags is large enough...Notice: You don't have to actually share it to see the preview, you can hit cancel at preview. Edited August 28, 2014 by SoItBegins Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now