firebase::invites::Invite

#include <invites.h>

Data structure used to construct and send an invite.

Summary

See also: firebase::invites::SendInvite()

Constructors and Destructors

Invite()
Initialize the invite.

Public static attributes

kMaxCallToActionTextLength = 20
const unsigned int
Maximum length for the call to action button.
kMaxDescriptionTextLength = 1000
const unsigned int
Maximum length for the app description.
kMaxEmailHtmlContentLength = 512000
const unsigned int
Maximum length for an HTML invitation message.
kMaxMessageLength = 100
const unsigned int
Maximum length for an invitation message.
kMinCallToActionTextLength = 2
const unsigned int
Minimum length for the call to action button.

Public attributes

android_minimum_version_code
int
Optional minimum version of the android app installed on the receiving device.
android_platform_client_id
std::string
The client ID for your app for the Android platform (don't set this for your current platform).
call_to_action_text
std::string
Text shown on the email invitation button for the user to accept the invitation.
custom_image_url
std::string
The URL for an image to include in the invitation.
deep_link_url
std::string
An optional dynamic link that will be sent with the invitation.
description_text
std::string
The app description text for email invitations.
email_content_html
std::string
The full HTML content of the invitation that will be sent.
email_subject_text
std::string
The subject text for an HTML e-mail.
google_analytics_tracking_id
std::string
The optional Google Analytics Tracking id.
ios_platform_client_id
std::string
The client ID for your app for the iOS platform (don't set this for your current platform).
message_text
std::string
The text of the invitation message.
referral_parameters
std::map< std::string, std::string >
Optional additional referral parameters, which is passed to the invite URL as a key/value pair.
title_text
std::string
The title text for the Invites UI window.

Public static attributes

kMaxCallToActionTextLength

const unsigned int firebase::invites::Invite::kMaxCallToActionTextLength = 20

Maximum length for the call to action button.

See also: Invite::call_to_action_text

kMaxDescriptionTextLength

const unsigned int firebase::invites::Invite::kMaxDescriptionTextLength = 1000

Maximum length for the app description.

See also: Invite::description_text

kMaxEmailHtmlContentLength

const unsigned int firebase::invites::Invite::kMaxEmailHtmlContentLength = 512000

Maximum length for an HTML invitation message.

See also: email_content_html

kMaxMessageLength

const unsigned int firebase::invites::Invite::kMaxMessageLength = 100

Maximum length for an invitation message.

See also:Invite::message_text.

kMinCallToActionTextLength

const unsigned int firebase::invites::Invite::kMinCallToActionTextLength = 2

Minimum length for the call to action button.

See also: Invite::call_to_action_text

Public attributes

android_minimum_version_code

int firebase::invites::Invite::android_minimum_version_code

Optional minimum version of the android app installed on the receiving device.

If you don't specify this, any Android version will be allowed.

android_platform_client_id

std::string firebase::invites::Invite::android_platform_client_id

The client ID for your app for the Android platform (don't set this for your current platform).

Make sure the client ID you specify here matches the client ID for your project in Google Developer Console for the other platform.

Note:Firebase is smart enough to infer this automatically if your project in Google Developer Console has only one app for each platform.

call_to_action_text

std::string firebase::invites::Invite::call_to_action_text

Text shown on the email invitation button for the user to accept the invitation.

Default text will be used if this is not set.

Note:The length of this text must not exceed kMaxCallToActionTextLength characters, and must be no shorter than kMinCallToActionTextLength characters.

custom_image_url

std::string firebase::invites::Invite::custom_image_url

The URL for an image to include in the invitation.

deep_link_url

std::string firebase::invites::Invite::deep_link_url

An optional dynamic link that will be sent with the invitation.

If you don't specify this, your invite will have no dynamic link.

description_text

std::string firebase::invites::Invite::description_text

The app description text for email invitations.

Note:The length of this text must not exceed kMaxDescriptionTextLength characters.Note:This function is for iOS only. On Android, this setting will be ignored, and your app's description will be automatically populated from its Google Play listing.

email_content_html

std::string firebase::invites::Invite::email_content_html

The full HTML content of the invitation that will be sent.

This should be properly-formatted UTF8 HTML with no JavaScript. The pattern %APPINVITE_LINK_PLACEHOLDER%% will be replaced with the invitation URL.

This takes precendence over the text functions message_text, call_to_action_text, and custom_image_url. If you want full control over the contents of the invitation, you should use this.

If you use this, you must also set email_subject_text or the HTML content will be ignored.

If you do use these HTML text fields, they will take priority over the standard text fields, if HTML is supported on your platform. You probably still want to set message_text and the other text fields in case your platform doesn't support HTML.

Note:HTML invitation content is only supported on Android.Note:The length of the HTML email content must not exceed kMaxEmailContentHtmlLength characters.

email_subject_text

std::string firebase::invites::Invite::email_subject_text

The subject text for an HTML e-mail.

If you use this, you must set email_content_html as well or the HTML content will be ignored.

google_analytics_tracking_id

std::string firebase::invites::Invite::google_analytics_tracking_id

The optional Google Analytics Tracking id.

The tracking id should be created for the calling application under Google Analytics. The tracking id is recommended so that invitations sent from the calling application are available in Google Analytics.

Note:This field is only supported on Android. On iOS, if you want to track invitations in Google Analytics, you will have to do so manually.

ios_platform_client_id

std::string firebase::invites::Invite::ios_platform_client_id

The client ID for your app for the iOS platform (don't set this for your current platform).

Make sure the client ID you specify here matches the client ID for your project in Google Developer Console for the other platform.

Note:Firebase is smart enough to infer this automatically if your project in Google Developer Console has only one app for each platform.

message_text

std::string firebase::invites::Invite::message_text

The text of the invitation message.

message_text, custom_image_url, and call_to_action_text comprise the standard text invitation options.

If you use the standard text methods as well as email_content_html and email_subject_text, the HTML methods will take priority if your platform supports them.

The user is able to modify this message before sending the invite.

Note:The length of this message must not exceed kMaxMessageLength characters, so it can fit in an SMS message along with the link.Note:You must set this and title_text or you will not be able to send an invitation.

referral_parameters

std::map< std::string, std::string > firebase::invites::Invite::referral_parameters

Optional additional referral parameters, which is passed to the invite URL as a key/value pair.

You can have any number of these.

These key/value pairs will be included in the referral URL as query parameters, so they can be read by the app on the receiving side.

Note:Referral parameters are only supported on Android.

title_text

std::string firebase::invites::Invite::title_text

The title text for the Invites UI window.

Note:You must set this and message_text to send invitations.

Public functions

Invite

 firebase::invites::Invite::Invite()

Initialize the invite.

Send feedback about...

Need help? Visit our support page.