SDKsReact Native
Get specified friends info
Batch retrieve friendship profile information for specified user IDs using the OpenIM React Native SDK.
Batch retrieve friendship records for a list of target user IDs:
const friends = await OpenIMSDK.getSpecifiedFriendsInfo({
userIDList: ['user_a', 'user_b'],
filterBlack: true,
});Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
userIDList | string[] | Yes | List of friend user IDs to retrieve. |
filterBlack | boolean | No | Whether to filter out blacklisted users; defaults to false. |
Return value
Resolves to an array of matching FriendUserItem[]. The return order is not guaranteed to match the input list. For field definitions, see Get friend list by page.
To fetch public profile cards for users who are not friends, use Get user profiles.
Was this page helpful?