public class


extends Object
implements Serializable
   ↳ co.megacool.megacool.ReferralCode

Class Overview

A referral code is the magic part tacked on to URLs shared through the SDK that allows us to credit a user for inviting others. You do not need to create these yourself, but they might be useful if you want to identify specific users as seen by Megacool.

A referral code consists of two parts:

8 characters that uniquely identifies the user/app combination.
2+ characters that identifies a given share. This enables us to associate each share with a GIF.

The userId is assigned from the server-side the first time the app gets online, but it's possible to create shares before this happens. These shares will be associated with a referral code that doesn't have a userId yet.


Public Methods
boolean equals(Object o)
String getShareId()
String getUserId()
int hashCode()
String toString()
Inherited Methods
From class java.lang.Object

Public Methods

public boolean equals (Object o)

public String getShareId ()

  • the shareId part of the referral code or an empty string if it's not set

public String getUserId ()

  • the userId part of the referral code, or null if it's not set yet.

public int hashCode ()

public String toString ()

  • The concatenation of userId and shareId, or null if there is no userId.