이 페이지는 현재 영어로만 제공되며 한국어 버전은 곧 제공될 예정입니다. 기다려 주셔서 감사드립니다.

Unity

Feature Description

Only locally stored users can be searched for, such as contacts or user profiles that have been pulled.

Searching for the Local User Profile

Call the FriendshipSearchFriends API (Details) to search for the local user profile. You can set the search keyword friendship_search_param_keyword_list and specify the search scope to set whether to search by the userID, nickName, and remark fields of a user.
Sample code:
// Search for a friend by keyword
FriendSearchParam param = new FriendSearchParam
{
friendship_search_param_keyword_list = new List<string>
{
"Keyword 1"
},
friendship_search_param_search_field_list = new List<TIMFriendshipSearchFieldKey>
{
TIMFriendshipSearchFieldKey.kTIMFriendshipSearchFieldKey_Identifier,
TIMFriendshipSearchFieldKey.kTIMFriendshipSearchFieldKey_NikeName,
TIMFriendshipSearchFieldKey.kTIMFriendshipSearchFieldKey_Remark
}
};
TIMResult res = TencentIMSDK.MsgSearchLocalMessages(param, (int code, string desc, List<FriendInfoGetResult> result, string user_data)=>{
// Process the async logic
});