How to invite a users friends to an event? Facebook Graph API

后端 未结 5 1900
故里飘歌
故里飘歌 2020-12-16 03:35

I have an application using the Graph API. I have it creating events for the user, but would like to let the user invite their friends from our site instead of having to go

5条回答
  •  清歌不尽
    2020-12-16 03:55

    you can also use javascript sdk:

    var inviteCallback = function(result) {
        console.log(result);
    };
    var event_intives = {
        method: 'events.invite',
        eid: event_id,
        uids: friends_list_array,
        personal_message: 'custom request message'
    };
    FB.api(event_intives, inviteCallback);
    

    if all ok, it should log 'true'

提交回复
热议问题