I am creating an application that posts information to facebook when a user downloads a specific music album. I have the information parsing correctly. So if a user clicks the download for album 1, it will pull the information and submit to the open graph and show up on facebook, however when I click on the next album button, instead of parsing the information for album 2, it posts the information for album 1 again. I have tried fbrefresh=CAN_BE_ANYTHING
but nothing seems to be working. Does anyone have insight to this?
Album 1 Meta Information parse.php?album=The%2520Pink%2520Slip
Album 2 Meta Information parse.php?album=The%2520Sexy%2520Single
Below is the code I am using:
<script type="text/javascript">
function postAlbum(album) {
FB.api('/me/skibsthekid:listen_to?album=http://www.skibsthekid.com/parse.php?album=' + album, 'post',
function(response) {
if (!response) {
alert('Error Occurred I got no response with ' + $pageURL);
} else if (response.error) {
alert('Error Occurred '+ response.error);
} else {
alert('Post was successful! Action ID: ' + album);
}
});
}
Parse.php
<?php
$title = $_GET['album'];
foreach(glob('files/'. $title .'/*.jpg') as $art) {
$art = str_replace(" ", "%20", $art);
$image = 'http://skibsthekid.com/' . $art;
}
?>
<meta property="fb:app_id" content="185324271585974" />
<meta property="og:type" content="music.album" />
<meta property="og:title" content="<?php echo $title; ?>" />
<meta property="og:image" content="<?php echo $image; ?>" />
<meta property="og:url" content="http://www.skibsthekid.com/parse.php?album=<?php echo urlencode($title); ?>&fbrefresh=CAN_BE_ANYTHING" />