I wish to manage the friends invitations to use a facebook app, in PHP.
- I saw the documentation for JS
- And already saw the request form doc
- I've already saw a lot of questions in stackoverflow.
But I can't find a good answer, because I don't wish to display those facebook dialog box !
First : Is it possible to do it in PHP, without displaying the facebook dialog box ?
I get the friends list with the following (user is already connected/allowed the app)
include("../config/fb_config.php");
$facebook = new Facebook(array(
'appId' => $fbconfig['appid'],
'secret' => $fbconfig['secret'],
'cookie' => true,
));
$friends = $facebook->api('me/friends');
foreach($friends['data'] as $users)
{
echo "<input type=\"checkbox\" name=\"".$users['id']."\"/>
".$users['name']."<br/>";
}
Is there any facebook url/method to send the invite requests, with checked ids and a message ?
Or something like the "publish a message on the user wall"
$facebook->api('/me/feed', 'post', array('message'=>'blabla...');