Note: You are viewing the Unreal version of this topic. To view this topic for Unity development, see Send Friend Requests from Apps - Mobile (Unity). To view this topic for native development, see Send Friend Requests from Apps - Mobile (Native).
Users can initiate friend requests to other users encountered in your app by launching the process from within the app. After the friend request has been sent via a deeplinked modal, the viewer is returned to your app. Users may find this process more convenient than using the Oculus phone app or returning to Oculus Home to send friend requests since it’s less disruptive to the app experience they are currently focused on.
For example, in a multiplayer game, a user might encounter another player that they liked. If this feature is implemented, they can initiate the friending process from within the game, send the friend request from a deeplinked modal, and be returned to their game once the request has been sent.
Note that this feature accesses user data and may require you to complete the Data Use Checkup form prior to submitting your app to the Oculus Store. For more information, see Complete a Data Use Checkup.
For Unreal development, you can use the Platform native API and information found in the Platform Unreal Development - Get Setup guide.
Note: This feature is only available for apps that target Quest and Quest 2.
The following methods are available to call from within your client app. Details about the functions can be found in the Platform SDK Reference Content.
This method deeplinks the viewer into a modal dialog targeting the specified user to receive a friend request. From the modal, the viewer can select Send to send a friend request and return to their app. Selecting Cancel returns the viewer to their app without sending a friend request.
After calling this method, you can use
ovr_LaunchFriendRequestFlowResult_GetDidCancel to get the results of the viewer’s actions from the deeplink.
Checks if the viewer sent a friend request from the deeplinked modal.
Checks if the viewer canceled or selected Back from the deep linked modal.
In some edge cases, the modal dialog that appears when
ovr_User_LaunchFriendRequestFlow is called may be different. The table below details such situations and what the user will see.
|Viewer tries to send a friend request to themselves||The viewer will receive a message indicating that this is not supported. Selecting Back returns the viewer to their app.|
|Viewer tries to send a friend request to someone that is already a friend||The viewer will receive a message informing them that they are already friends. Selecting Back returns the viewer to their app.|
|Viewer tries to send a friend request to someone they already sent a pending friend request||The viewer will receive a message informing them that they have already sent a friend request to that user. Selecting Back returns the viewer to their app.|
|Viewer tries to send a friend request to someone they already have a pending request from||The viewer will receive a message informing them of the pending friend request. From there, they can select Accept to accept the received friend request and return to their app, or they can select Cancel to return to their app without accepting or denying the friend request.||On Accept:|
|Viewer tries to send a friend request to someone they blocked previously||The viewer will receive a message informing them of the situation and asking whether they would like to unblock the target user and send a friend request. If the viewer selects Unblock and Send, the target user is unblocked, a friend request is sent, and the user is returned to their app. Otherwise, selecting Back will return the viewer to their app.||On Unblock and Send:|
|Viewer tries to send a friend request to someone that has blocked them previously||The user will receive the following message: We cant show you this person right now. Please try again later.|
|The friend request cannot be sent for some other reason||The user will receive the following message: We cant show you this person right now. Please try again later.|