skip to Main Content

I am having a screen through which user can share referral code on Facebook, WhatsApp, Twitter and Instagram. (I already have an API to generate referral codes). Now I was going through branch.io documentation. But all I could find was deep linking. I am not able to understand how to use branch.io to share the referral codes across all these platforms or should I use something else to program this functionality.

My app screenshotreferral code screen

4

Answers


  1. This will allow you to share on every application possible

    Intent sharingIntent = new Intent(android.content.Intent.ACTION_SEND);
                sharingIntent.setType("text/plain");
                sharingIntent.putExtra(android.content.Intent.EXTRA_SUBJECT, "Subject Here");
                sharingIntent.putExtra(android.content.Intent.EXTRA_TEXT, "share content");
                startActivity(Intent.createChooser(sharingIntent, "share using"));
    
    Login or Signup to reply.
  2. Why not send referal code / link using sharing intent

    Intent sendIntent = new Intent();
    sendIntent.setAction(Intent.ACTION_SEND);
    sendIntent.putExtra(Intent.EXTRA_TEXT, "This is my text to send.");
    sendIntent.setType("text/plain");
    startActivity(sendIntent);
    

    see the Documentation for more info

    and you can filter the app using the answer over Here

    Login or Signup to reply.
  3. Best way to share such information is via http url’s as most of the sharing platforms don’t allow to post pre-filled text.

    Most of the sharing platforms read the meta content inside the html page of the url and make a post accordingly.

    Go through this link for meta tags to be used for Facebook :-
    https://developers.facebook.com/docs/sharing/webmasters

    And, for sharing links use this:-

    Intent share = new Intent(android.content.Intent.ACTION_SEND);
            share.setType("text/plain");
            share.addFlags(Intent.FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET);
    
            share.putExtra(Intent.EXTRA_SUBJECT, "Title Of The Post");
            share.putExtra(Intent.EXTRA_TEXT, "<source url>");
    
            startActivity(Intent.createChooser(share, "Share text to..."));
    
    Login or Signup to reply.
  4. Alex from Branch.io here.

    We actually used to offer a referral code feature exactly as you’ve described, but deprecated it a while back in favor of a referral link system. The reason why is actually quite interesting: our partner apps found codes unnecessary and a lot of extra work. The way Branch handles referrals is fundamentally different and far more user-friendly, so you actually don’t need to make the user enter a code at all.

    Traditional app referral process

    1. Inviting User gets a code
    2. Inviting User gives a code to a friend (Invited User) and says ‘go download this app and enter my code!’
    3. Invited User hopefully downloads the app, hopefully finds out how to enter a code, hopefully enters the code correctly
    4. Inviting User gets a reward

    As you can see, plenty of places where that process can go wrong.

    Branch referral process

    1. Inviting User gets a link
    2. Inviting User sends the link to a friend (Invited User)
    3. Invited User clicks the link, is sent directly to the Play Store, downloads the app, and automatically triggers the referral redemption logic without any manual work
    4. Inviting User gets a reward

    This works because Branch tracks the user who originally created the link, and can report back on that when the new user successfully downloads/purchases/whatever else the first time after opening the link. It is a much simpler and more seamless process, and the Branch referral infrastructure is so reliable that it ‘just works’.

    Here is the documentation page for setting this up: https://dev.branch.io/features/referral-programs/

    Using the Share Sheet

    Branch offers a pre-built share sheet on Android that you can use to post these links via any installed app. It may not be especially useful to you because you’ve already built your own custom icons, but it would avoid an error if one of those apps is not available.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search