Ciao a tutti, è la prima applicazione per facebook che scrivo quindi scusate l'ignoranza.
Il mio intento era quello di realizzare un app che desse moto all'utente di invitare i propri amici ad utilizzare la mia app e avevo trovato sul sito ufficiale di fb questo codice:
Codice PHP:
<?php 

require '../src/facebook.php';

// Create our Application instance (replace this with your appId and secret).
$facebook = new Facebook(array(
  
'appId'  => 'MIA_APP_ID',
  
'secret' => 'SECRET_ID',
));

$user_id $facebook->getUser();

$access_token $facebook->getAccessToken();

  
$token_url "https://graph.facebook.com/oauth/access_token?" .
    
"client_id=" $app_id .
    
"&client_secret=" $app_secret .
    
"&grant_type=client_credentials";

  
$app_access_token $access_token;
  
/* QUESTO è L'ID DELL'AMICO AL QUALE MANDARE L'IVITO
      CHE RECUPERO DALLA PAGINA PRECEDENTE
 */
  
$user_id $_GET["user"];

  
$apprequest_url ="https://graph.facebook.com/" .
    
$user_id .
    
"/apprequests?message=MyFriends" 
    
"&data=INSERT_STRING_DATA&"  .   
    
$app_access_token "&method=post";

  
$result file_get_contents($apprequest_url);
  echo(
"Request id number: "$result);
?>
ma purtroppo ricevo questo errore:
Warning: file_get_contents(https://graph.facebook.com/100000993...ZD&method=post) [function.file-get-contents]: failed to open stream: HTTP request failed! HTTP/1.0 400 Bad Request in /web/htdocs/www.mmdeveloper.it/home/myFriends/examples/manda_invito.php on line 30

qualcuno sa aiutarmi??

grazie in anticipo