fbpx

test

[insert_php]
//facebook stuff
$access_token = ‘CAACEdEose0cBANkdyQnJZCLCZCSpcaL1HSNneq7UhnZAsehBYjgeNunz4mmIlkX3TNLHpN0zZBqmWL1PjkgB3zYZBI8Hz2y2SrtYGUvpRWTQJdzpyAHRg6xxZCTsRgTbG16ZAw6UgE4W7NrBNcAJWbcOZAdBMb1QU5vipCn0MYoA1UpcYfDokLqnXaZA6eDbwTUwZD’;
$page_id = ‘1453047451655513’;
$data[‘picture’] = “http://www.lincolnescaperoom.com/” . $target_file;
$data[‘link’] = “http://www.example.com/our-guests?id=” . $GLOBALS[‘wpdb’]->insert_id . “&rank=” . $rank;
$data[‘message’] = “Check out how ” . $_POST[‘groupname’] . ” did trying to escape!”;
$data[‘caption’] = “Lincoln Escape Room”;
$data[‘description’] = “Come see if you can beat your friend’s time at http://www.lincolnescaperoom.com”;
$data[‘access_token’] = $access_token;
$post_url = ‘https://graph.facebook.com/’.$page_id.’/feed’;
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $post_url);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$return = curl_exec($ch);
curl_close($ch);
//end of facebook stuff
[/insert_php]