/** * Helper to show the provided {@link com.facebook.share.model.ShareContent} using the provided * Fragment. No callback will be invoked. * * @param fragment android.app.Fragment to use to send the provided content * @param shareContent Content to send */ public static void show( final android.app.Fragment fragment, final ShareContent shareContent) { show(new FragmentWrapper(fragment), shareContent); }
/** * Helper to show the provided {@link com.facebook.share.model.ShareContent} using the provided * Fragment. No callback will be invoked. * * @param fragment android.support.v4.app.Fragment to use to send the provided content * @param shareContent Content to send */ public static void show( final Fragment fragment, final ShareContent shareContent) { show(new FragmentWrapper(fragment), shareContent); }
/** * Helper to show the provided {@link com.facebook.share.model.ShareContent} using the provided * Activity. No callback will be invoked. * * @param activity Activity to use to send the provided content * @param shareContent Content to send */ public static void show( final Activity activity, final ShareContent shareContent) { new MessageDialog(activity).show(shareContent); }
private static void show( final FragmentWrapper fragmentWrapper, final ShareContent shareContent) { new MessageDialog(fragmentWrapper).show(shareContent); }
public void shareUsingMessengerDialog() { if (playerChoice == INVALID_CHOICE || computerChoice == INVALID_CHOICE) { ShareContent content = getLinkContent(); // share the app if (messageDialog.canShow(content)) { messageDialog.show(content); } else { showInstallMessengerAppInGooglePlay(); } } else { ShareContent content = getThrowActionContent(); if (messageDialog.canShow(content)) { messageDialog.show(content); } else { showInstallMessengerAppInGooglePlay(); } } }