this is my invitation code:
<?php
$app_id = "12345678910112";
$canvas_page = "http://apps.facebook.com/apppage/";
$con = new mysqli("localhost","username","password","dbname") or die(mysqli_connect_error());
$SQL=mysqli_query($con,"select the already invited friends");
$exclude_ids="";
while($row = mysqli_fetch_assoc($SQL))
{
$exclude_ids=$exclude_ids . "," . $row['inviteduserid'] ;
}
mysqli_free_result($SQL);
mysqli_close($con);
// now the $exclude_ids will look like this 12321324,54621321,465498631,23184641
$message = "join this cool app";
$filters = array('app_non_users');
$requests_url = "https://www.facebook.com/dialog/apprequests?app_id=" . $app_id
. "&redirect_uri=" . urlencode($canvas_page)
. "&message=" . $message
. "&filters=" . json_encode($filters)
. "&max_recipients=25"
. "&exclude_ids=" . $exclude_ids;
?>
every thing is working very well except it is not excluding the invited friends.
what is wrong with this?
thanks Lix,but i don’t know why is it still not working for me.
anyway i had to make my way around, and since the exclude ids is not working bu the filter is perfectly does so i will use the filter parameter to only show the uninvited friends like this.
i know it is not the best solution but it works…