Android SDK Version
  • java.lang.Object
    • com.facebook.referrals.ReferralManager

public class ReferralManager
extends java.lang.Object
This class manages referrals for Facebook.
Method Summary
Modifier and TypeMethod and Description
static ReferralManagergetInstance()
Getter for the referral manager.
voidregisterCallback(CallbackManager callbackManager, FacebookCallback<ReferralResult> callback)
Registers a referral callback to the given callback manager.
voidstartReferral(Activity activity)
Open the referral dialog.
voidstartReferral(android.app.Fragment fragment)
Open the referral dialog.
voidstartReferral(Fragment fragment)
Open the referral dialog.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Method Detail

getInstance

public static ReferralManager getInstance()
Getter for the referral manager.
Returns:
The referral manager.

startReferral

public void startReferral(Activity activity)
Open the referral dialog.
Parameters:
activity - The activity which is starting the referral process.

startReferral

public void startReferral(Fragment fragment)
Open the referral dialog.
Parameters:
fragment - The android.support.v4.app.Fragment which is starting the referral process.

startReferral

public void startReferral(android.app.Fragment fragment)
Open the referral dialog.
Parameters:
fragment - The android.app.Fragment which is starting the referral process.

registerCallback

public void registerCallback(CallbackManager callbackManager,
                             FacebookCallback<ReferralResult> callback)
Registers a referral callback to the given callback manager.
Parameters:
callbackManager - The callback manager that will encapsulate the callback.
callback - The referral callback that will be called on referral completion.