Better implementation of the Open Graph protocol

TransAmDan

Forum Admin
Staff member
The Open Graph protocol enables any web page to become a rich object in a social graph. For instance, this is used on Facebook to allow any web page to have the same functionality as any other object on Facebook.

Many pages on the website do have the open graph information at the top of the pages, however is crudely filled in like below. This was taken from a forum page.

HTML:
<meta property="og:site_name" content="Solent Renegades"/>
<meta property="og:description" content="Solent Renegades Car Club . UK"/>
<meta property="og:url" content="http://www.solent-renegades.co.uk/threads/9541-Why-I-didn-t-make-it-to-the-Brickworks"/>
<meta property="og:type" content="article"/>
<meta property="og:image" content="http://cdn.solent-renegades.co.uk/images/solent-renegades-logo.gif"/>

In my search on the interweb, i came across this write up, http://problems.tondaruzicka.cz/adding-custom-facebook-open-graph-tags-to-vbulletin-4-1-0/ someone looked into this same problem towards the end of 2012. In the title tag it is using thread[titlle] and will be this title on every page on the website. Well this would work well if the website was forum threads only. But we have CMS(Articles) and blogs and many more types of pages. I may be able to use some of the code, but there will need to be a case statement testing what script it is running to know what type of data to populate it with, weather its forum or blog pages.. etc..

When you past a link to the forum from facebook, facebook looks at this information on the pages and displays it in the link, the description, link, and image are used.

Really the Description tags should reflect the fords on the page, along with the URL. When the VB SEO plugin was enabled it helped as it made better use of the Open Graph section. I need to do this manually by editing the Vbulletin templates.

In the
facebook_templates >> facebook_opengraph template. is

Code:
<vb:each from="opengrapharray" key="property" value="content"><meta property="{vb:raw property}" content="{vb:raw content}"></vb:each>

So it can be edited here. I need to look into the templates deeper. This is called from the header_include template.
 
Back
Top