DIGITALREP

How to add Facebook meta tags to your webpageOctober 06, 2013

So you want to add facebook meta tags to your webpage and officially join the new age of social media? Good for you! By doing this you are turning your webpage into a self-hosted open graph object.

According to Facebook, objects are the ‘nouns’ for the ‘verbs’ (or actions) taken by people using your Facebook app. For example, when a visitor clicks the Facebook like button on your webpage, they are ‘liking’ your ‘webpage’.

Now, because you’ve added meta-tags to your webpage, it’s now your open graph object, and you now actually have some control over the image and text that is subsequently displayed on the user’s Facebook timeline. Great!

Simply use these meta property tags in the head section of your webpage and you’re good to go:

<meta property=”og:site_name” content=”My Site”/>

<meta property=”og:image” content=”http://mysite.com/images/mylogo.png”/>

<meta property=”og:title” content=”Some Page”/>

<meta property=”og:description” content=”This page is about alien cats who live in space boxes”/>

<meta property=”og:url” content=”http://mysite.com/somepage”/>

<meta property=”og:type” content=”website”/>

(This ‘type’ could also be music, video, article, book, profile. Not including this means Facebook will automatically treat it as a website.)

If you do happen to have a type other than the humble old website, you can add extra properties to it; look these up here: Facebook Open Graph Protocol

Category: Tutorials
Tags:  

Leave a Reply

Your email address will not be published. Required fields are marked *