Login   Register  
PHP Classes
elePHPant
Icontem

Calling PHP Variables Within OpenGraph Meta Data For Facebook

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us

      Top level forums  >  PHP Specialists  >  General  >  Calling PHP Variables Within OpenGraph Meta Data For Facebook  
Subject:Calling PHP Variables Within OpenGraph Meta Data For Facebook
Summary:I'm trying to call a variable, but am unsure correct syntax
Messages:1
Author:Gareth Wilson
Date:2014-02-11 21:36:39
Update:2014-02-12 03:57:38
 

  1. Calling PHP Variables Within OpenGraph Meta Data For Facebook   Reply  
Picture of Gareth Wilson
Gareth Wilson
2014-02-12 03:57:38
Hi,

I'm trying to pass a variable from my php script on the page into the og;metadata, but on the timeline all that is shown is the standard html metadata, am I using the correct php code to call the variable so that it shows up on the timeline?

<meta property="og:title" content="<?php $_GET['$title']; ?>"/>

the title variable comes from here;

$title = urlencode("Take The Test!");

Any help on this is much appreciated, Gareth