Skip to main content

acceptFriendApplication

Feature Introduction

Description

Accepts a friend request from another user. If successful, a two-way friendship is established immediately.

Function Prototype


- (void)acceptFriendApplication:(NSString *)userID
handleMsg:(NSString *)msg
onSuccess:(nullable OIMSuccessCallback)onSuccess
onFailure:(nullable OIMFailureCallback)onFailure;

Input Parameters

Parameter NameData TypeMandatoryDescription
userIDNSStringYesUser ID of the requester
msgNSStringYesMessage

Return Results

Parameter NameData TypeDescription
onSuccessOIMSuccessCallbackSuccess return
onFailureOIMFailureCallbackFailure return

Code Sample


[OIMManager.manager acceptFriendApplication:@""
handleMsg:@""
onSuccess:^(NSString * _Nullable data) {
} onFailure:^(NSInteger code, NSString * _Nullable msg) {
}];