
Untitled
By: a guest on Jan 28th, 2012 | syntax:
None | size: 1.45 KB | hits: 28 | expires: Never
<?php
$app_name = "Outbreak: Revenge";
$app_url = "outbreakrevenge";
$app_image = "";
$invite_href = "recruit.php";
if(isset($_POST["ids"]))
{
echo "<fieldset><center>You have recruited ".sizeof($_POST["ids"])." of your friends to play <b><a href=\"http://apps.facebook.com/".$app_url."/\">".$app_name."</a></b>.<br><br>\n</center></fieldset><br>";
include("index.php");
}
else
{
$fql = 'SELECT uid FROM user WHERE uid IN (SELECT uid2 FROM friend WHERE uid1='.$user_id.') AND is_app_user = 1';
$_friends = $facebook->api_client->fql_query($fql);
$friends = array();
if (is_array($_friends) && count($_friends))
{
foreach ($_friends as $friend) { $friends[] = $friend['uid'];
}
}
$friends = implode(',', $friends);
$content = "<fb:name uid=\"".$user."\" firstnameonly=\"true\" shownetwork=\"false\"/> has recruited you to his raiding squad in <a href=\"http://apps.facebook.com/".$app_url."/\">".$app_name."</a>! \n"."Grab your weapons, join your squad, and avenge the human race from the infected!"."<fb:req-choice url=\"".$facebook->get_add_url()."\" label=\"Join the Hunt!\"/>";
?>
<fb:request-form action="<?php echo $invite_href; ?>" method="post" type="<?php echo $app_name; ?>" content="<?php echo htmlentities($content); ?>" image="<?php echo $app_image; ?>"> <fb:multi-friend-selector actiontext="Recruit your friends to help avenge humanity!" exclude_ids="<?php echo $friends; ?>" /> </fb:request-form><br> <?php }
?>