Initialize Referd User Profile
Show your user's profile including all details on React-native app.
Last updated
Show your user's profile including all details on React-native app.
Last updated
Showing the Referd widget on your mobile application is slightly different than showing it on the website. You have two options; first, if you want to design your customer interface, you will use our set of REST APIs. The other option as this section elaborates, is through using our react native SDK.
Using the SDK, you can open the Referd user profile from a button in your app, programmatically when someone does something, or from a persistent button that sits over your app’s UI.
When you trigger the Referd user profile, your player is presented with a home screen. This is configurable inside Referd to change how it looks and what’s presented.
From there, your user can check his progress across different Referd programs as per your configurations.
To show the Referd user profile that contains the user details use the below steps.
There are two ways to view the widget.
and then to open the widget you need to call the showProfile function on the ref property of the widget
Example on running the widget as a Modal:
In certain scenarios, where you offer a product as a free reward, you might want to showcase this product within the Referd widget along with a deep link. When users click on the deep link, they will be seamlessly redirected to the product page within your app, where they can obtain more information and take further action. To enable this functionality, you need to follow the steps outlined below.
Create a custom Referd widget that is based on the default widget and implemented as a ForwardRefRenderFunction.
Override the WebView's 'onShouldStartLoadWithRequest' event with a customized implementation.
In this implementation, detect URLs that begin with '{your_app_deep_link_prefix}://' to identify deep links specific to your app.
Handle these deep links using the main app's action to process and dispatch them, instead of relying on the WebView."