Facebook Graph API的taggable_friends接口废弃后,求获取好友列表及头像的替代方案
taggable_friends Deprecation Got it, let's break down your problem. The taggable_friends endpoint being deprecated back in 2018 ties directly to Facebook's tightened privacy rules, so we need to use options that align with their current policies. Here are your best bets depending on your use case:
1. user_friends Permission + /me/friends Endpoint
This is the primary way to get friend data now, but there's a key catch: it only returns friends who have also authorized your app with the user_friends permission.
To implement this:
- Request the
user_friendspermission during Facebook Login. - Call the endpoint with the fields you need:
GET /me/friends?fields=id,name,picture
The response will include each eligible friend's ID, name, and avatar (via the picture field). Just remember—this won't give you the user's full friend list, only those who actively use your app.
2. Built-in Facebook UI Components for Tagging/Sharing
If your original goal was letting users tag friends in posts or photos, you don't need to fetch friend data directly. Facebook's native UI tools (like the Share Dialog or Photo Upload Dialog) have built-in tagging functionality.
These components handle friend selection entirely on Facebook's end, so you don't have to manage friend data in your app. This is privacy-compliant and saves you from dealing with deprecated endpoints altogether.
3. invitable_friends for Game Apps (Invitation Scenarios)
If you're building a game and need to let users invite friends to join, the invitable_friends endpoint is a valid option. It returns friends who haven't used your app yet (but can be invited), along with their ID, name, and avatar.
Call it like this:
GET /me/invitable_friends?fields=id,name,picture
Note: This endpoint is restricted to game apps only—won't work for non-game use cases.
Critical Privacy Reminder
Facebook no longer allows apps to access a user's full friend list for most use cases. All these alternatives are designed to respect user privacy by only sharing friend data relevant to the app's core functionality (e.g., connecting with app users, sending invitations).
内容的提问来源于stack exchange,提问作者fahadTariq

