Setting varibales for FB OG metadata

edited February 2014 in Share
When we first created our site we set up some Facebook Open Graph metadata so that links send to FB would have a specific format. We put this format in our header (extra spaces after first carrot just so it will show up here):

< meta property="og:image" content="" />
< meta property="og:title" content="Meet Us" />
< meta property="og:description" content="We are your system for..." />

But now we want to have a few specific pages that have their own OG metadata for a promotion and I've tried a couple different techniques without success such as trying to set variables in _variables/global.php or just switching out the first line with:

< meta property="og:image" content="<?=fuel_var('og_image', '') ?>" />

and then in my view setting the var like this:

<?=fuel_set_var('og_img', '')?>

Neither of these worked. Does anyone have other recommendations or just things I might have done wrong using either of these techniques?


  • edited 3:48AM
    You appear to be using 'og_img' for fuel_set_var instead of 'og_image'. Could that be the problem?
  • edited 3:48AM
    I think it was. Thanks for catching my typo. Sometimes no matter how many times you scan for small things and typos you need another pair of eyes to see it. Thanks!
Sign In or Register to comment.