0

Error occur when i invite friend to a public event. (event with can_invite_friend) If i get permissions with fql, create event is set to 1.

The error : Application does not have permission for this action

My code :

$oFacebook = new Facebook(array(
        'appId' => CLE_PUBLIQUE,
        'secret' => CLE_SECRETE,
        'cookie' => true,
    ));
$user = $oFacebook->getUser();
$userToken = $oFacebook->getAccessToken(); 
$resultinvite = $oFacebook->api
   ("/".$eid . "/invited/" . $sspId, "POST", Array('access_token' => $userToken));

Thanks Robin

  • Have you made sure your $userToken actually _is_ a user token? – CBroe Dec 16 '12 at 11:20
  • Well then check it using the debug tool: https://developers.facebook.com/tools/debug Have you had the user login to your app first to get a user access token? – CBroe Dec 16 '12 at 12:50
  • I invite friend after login and my token in débug respond : ID de l’application : 281933465260281 : SSPEvent Identifiant utilisateur : 100001501810886 : Station Son Particulier Émis : 1355665499 (Il y a 24 secondes) Expiration : 1360849499 (in about 2 months) Valide : Vrai Origine : Web Étendues : create_event create_note friends_events manage_notifications photo_upload publish_actions publish_stream read_stream rsvp_event share_item status_update user_events video_upload – Robin Mahy Dec 16 '12 at 13:49

1 Answers1

0

Its really simple, you need the rsvp_event Permission

And remember that you need to attend the event before invite some one.

Julio Popócatl
  • 712
  • 8
  • 16