Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Open Graph Protocol - how to make it work with multiple stories on a page?

The Open Graph Protocol is a new methodology for storing metadata to make it easier for third party sites (think the Facebook LIKE button) to identify relevant content on your page.

It looks like this:

<title>The Rock (1996)</title>
<meta property="og:title" content="The Rock" />
<meta property="og:type" content="movie" />
<meta property="og:url" content="http://www.imdb.com/title/tt0117500/" />
<meta property="og:image" content="http://ia.media-imdb.com/images/rock.jpg" />

The question is, if you have multiple LIKE buttons on a page, each for a different article, how does one differentiate the Open Graph meta tags that belong to the article, not the page itself. Since the tags go in the HEAD is seems you only get one set per page.

Can Open Graph be "namespaced" or associated with content within the page, rather than the page itself?

like image 257
Diodeus - James MacFarlane Avatar asked Dec 07 '10 14:12

Diodeus - James MacFarlane


People also ask

How do I use Open Graph tags on my website?

Just go to Page Settings > Social Image > Upload. If you need to add other OG tags and customize the default settings, go to Page Settings > Advanced > Page Header Code Injection. Read the following section on adding the tags manually and copy-paste the code there.

How do OG tags work?

The four basic open graph tags that are required for each page are og:title , og:type , og:image , and og:url . These tags should be unique for each page you serve, meaning your homepage's tags should all be different from your blog post article's page.

Does Open Graph affect SEO?

Open Graph tags have no direct impact on the page's SEO, but they improve the display and the usability of your links on social media, which is no less essential. Let's take a look at the key Open Graph tags and how to use them.


1 Answers

As far as I know, you're stuck - but if you figure out a way, let me know!

I worked on a project that needed to have multiple Open Graph tags on a page - in the end, we ended up trimming down the number of items we needed OG for, so that we'd only have one story on a page.

like image 72
girasquid Avatar answered Oct 05 '22 00:10

girasquid