Skip to main content

checkFriend

Feature Introduction

Description

Verify friendship to determine if they are in your friend list.

Note

Since friendship is a mutual relationship, just verifying if the other party is in your friend list does not verify if you are in the other party's friend list.

Function Prototype


- (void)checkFriend:(NSArray <NSString *> *)usersID
onSuccess:(nullable OIMSimpleResultsCallback)onSuccess
onFailure:(nullable OIMFailureCallback)onFailure;

Input Parameters

Parameter NameParameter TypeMandatoryDescription
usersIDNSArray <NSString *>YesUser ID List

Return Value

Parameter NameParameter TypeDescription
onSuccessNSArray< OIMSimpleResultInfo * >Success Return
onFailureOIMFailureCallbackFailure Return

OIMSimpleResultInfo

Field NameField TypeDescription
userIDNSStringUser ID
resultNSIntegerOn checkFriend: result is 1 means friend (and not in the blacklist)

Code Sample


[OIMManager.manager checkFriend:@[]
onSuccess:^(NSArray<OIMSimpleResultInfo *> * _Nullable results) {
} onFailure:^(NSInteger code, NSString * _Nullable msg) {
}];