How to make a user subscribe to an event in facebook using Graph API?

后端 未结 1 763
醉酒成梦
醉酒成梦 2021-01-15 14:08

I would like to users when added to this website event registration also subscribe to the event in the facebook.
The system is already asking for the \"create_event\" ex

相关标签:
1条回答
  • 2021-01-15 14:38

    It's documented in the event object page:

    // RSVP to an Event  
        curl -d "access_token=XXX"  
              https://graph.facebook.com/EVENT_ID/{attending|declined}
    

    So you need to grant the rsvp_event permission.
    Example using the php-sdk:

    $facebook->api("/EVENT_ID/attending", "post", array("access_token" => "XXXXX"));
    
    0 讨论(0)
提交回复
热议问题