el código que utilizo es
Código PHP:
<?PHP
require_once 'facebook-platform/client/facebook.php';
// Get these from http://developers.facebook.com
$api_key = 'xxxxxxxxxxxxxxxxxx';
$secret = 'xxxxxxxxxxxxxxxxxx'; // Names and links
$app_name = "Videos Gratis Para Celular";
$app_url = "http://apps.facebook.com/videosgratis/"; // Assumes application is at http://apps.facebook.com/app-url/
$invite_href = "http://www.facebook.com/apps/application.php?id=109039175793282"; // Rename this as needed
$facebook = new Facebook($api_key, $secret);
$facebook->require_frame();
$user = $facebook->require_login();
if(isset($_POST["ids"]))
{
echo "<center>Thank you for inviting ".sizeof($_POST["ids"])." of your friends on <b><a href='http://apps.facebook.com/".$app_url."/'>".$app_name."</a></b>.<br><br>n";
echo "<h2><a href='http://apps.facebook.com/".$app_url."/'>Click here to return to ".$app_name."</a>.</h2></center>";
}
else { // Retrieve array of friends who've already authorized the app.
$fql = 'SELECT uid FROM user WHERE uid IN (SELECT uid2 FROM friend WHERE uid1='.$user.') AND is_app_user = 1';
$_friends = $facebook->api_client->fql_query($fql); // Extract the user ID's returned in the FQL request into a new array.
$friends = array();
if (is_array($_friends) && count($_friends))
{
foreach ($_friends as $friend)
{
$friends[] = $friend['uid'];
}
} // Convert the array of friends into a comma-delimeted string.
$friends = implode(',', $friends); // Prepare the invitation text that all invited users will receive.
$content = "<fb:name uid='".$user."' firstnameonly='true' shownetwork='false'/>
has started using <a href='http://apps.facebook.com/".$app_url."/'>'".$app_name."'</a>
and thought it's so cool even you should try it outn'
<fb:req-choice url='".$facebook->get_add_url()."' label='Put ".$app_name." on your profile'/>";
?>
<fb:request-form action="<? echo $invite_href; ?>" method="post" type="<? echo $app_name; ?>" content="<? echo htmlentities($content,ENT_COMPAT,'UTF-8'); ?>">
<fb:multi-friend-selector actiontext="Here are your friends who don't have <? echo $app_name; ?> yet. Invite whoever you want -it's free!" exclude_ids="<? echo $friends; ?>" /> </fb:request-form> <?PHP } ?>
- wiki.developers.facebook.com/index.php/Fb:request-form
- facebook-developer.net/2008/02/20/allow-your-users-to-invite-their-friends/
no se que estoy haciendo mal que no me sale nada. Antes de esto si pude hacer la conexión a los apis y me mostraba mis amigos sus nombres y hasta el dia de cumpleaños de mis amigos.
gracias si alguien me puede ayudar