How to programmatically invite Facebook friends on a website

后端 未结 1 853
野的像风
野的像风 2021-02-13 14:50

The functionality that I need is to show a list of Facebook friends to the user on the website page with custom design, where the user can select some of them and send invites.<

1条回答
  •  孤独总比滥情好
    2021-02-13 15:05

    You are not allowed to use taggable_friends for inviting them, obviously it is for TAGGING friends and you only get a tagging token.

    There is invitable_friends, but:

    The invitable_friends API is only available for games that have a Facebook Canvas app implementation using version 2.0 of the Graph API.

    (https://developers.facebook.com/docs/games/invitable-friends/v2.1)

    I am afraid what you want to achieve is not possible. The proper way to invite friends to your website is to use the Send Dialog: https://developers.facebook.com/docs/sharing/reference/send-dialog

    You can include one User ID in the "to" parameter. Of course it must be a User who authorized your App too, you can get those with /me/friends. Or better: Just open the Dialog and let the User select on his own.

    0 讨论(0)
提交回复
热议问题