Followed — 's tutorial for a Facebook share button, and got it working fine to show a highscore variable on Facebook, I'm trying to display 2 variables in the Facebook post, highscore and the level they were on and just can't get it working. In my .php file I have
<?php
$score = $_GET["score"];
$scorex = explode(":", $score);
$highscore = $scorex[0];
$level = $_GET["level"];
$levelx = explode(":", $level);
$levelsCompleted = $levelx[0];
?>
<html>
<head>
<title>Site Name</title>
<meta property="og:title" content="I got <?echo $highscore;?> on Level <?echo $levelsCompleted;?> in this game!"/>
<meta property="og:image" content="http://mywebsite.com/game.png"/>
<meta property="og:site_name" content="Game Title"/>
<meta property="og:description" content="I got <?echo $highscore;?> on Level <?echo $levelsCompleted;?> in this game!"/>
</head>
<body>
<meta http-equiv="refresh" content="0;URL=http://www.mysite.com" />
</body>
</html>
Then I have this code on my on touch event/browser event
"https://www.facebook.com/sharer/sharer.php?u=http://www.mysite.com/share.php? score="& highscore & ":" & random(1,0) & "level="& levelsCompleted & ":" & random(1,0)
The highscore works fine but I can't get the levels to show up, not sure if it's the .php or my browser event is wrong. Any help would be appreciated, thanks.