Setup Invites Channels on Unity¶
Prerequisite¶
- Finished Getting Started with GetSocial Unity SDK guide.
Setup Invite Channels¶
GetSocial Smart Invites has two types of Invite Channels:
- The one that works out of the box, e.g., SMS, Email, WhatsApp, Messenger, Kik, Line, Twitter, Facebook.
- Ones that require integration of 3rd-party SDKs.
In this step, we will integrate GetSocial with the 3rd-party SDKs.
Setup Integration with Facebook SDK¶
Starting from the GetSocial SDK v6.20.7 we provide Facebook invite channel without the need to integrate Facebook SDK. The following guide shows how to integrate GetSocial with Facebook SDK for the older GetSocial SDK versions and to provide better invite flow UX.
The benefits of Facebook SDK integration:
- You can track
onSuccess/onError/onCancel
events. - User is brought back to your application after an invite.
- Invite is done by Facebook application, or WebView inside your app if Facebook is not installed.
GetSocial is compatible with Facebook Unity SDK v7.x, older versions are not supported. Integration does not require Facebook application installed to be able to send invitations.
Facebook is deprecating App Invites
Facebook is deprecating App Invites from February 5, 2018.
New GetSocial integration with Facebook will allow posting Smart Invite to the timeline, friend’s timeline or a group. To upgrade, replace FacebookInvitePlugin
with FacebookSharePlugin .
More: https://blog.getsocial.im/facebook-deprecates-app-invites-are-you-ready/
- Integrate Facebook Unity SDK into your app as described in the Official Guide.
- Copy implementation of the Facebook Share plugin from GetSocial GitHub repository into your project.
-
Register plugin with GetSocial before inviting via Facebook. We recommend registering in
GameObject.onStart()
method:void Start () { // ... other code GetSocial.RegisterInviteChannelPlugin(InviteChannelIds.Facebook, new FacebookSharePlugin()); }
-
To validate integration, open the GetSocial Smart Invites view:
GetSocialUi.CreateInvitesView().Show();
The list should contain Facebook:
If you want to check Facebook’s referral data on your own, use the following setting:
Setup Integration with Facebook Messenger for iOS¶
To enable FB Messenger invites on iOS:
-
Download
GetSocialFBMessengerInvitePlugin.unitypackage
from our GitHub Repo. -
Imprort this package into your Unity project.
-
Call
GetSocialFBMessengerPluginHelper.RegisterFBMessengerPlugin();
on the app start, e.g., fromAwake()
method of yourMonoBehaviour
. -
To validate integration, open the GetSocial Smart Invites view:
GetSocialUi.CreateInvitesView().Show();
Check if Facebook Messenger is listed there:
Setup Integration with Facebook Stories for iOS¶
- Integrate Facebook iOS SDK into your app as described in the Official Guide.
- Make sure, that the Facebook Stories provider is enabled on Dashboard.
Next Steps¶
- Send your first Smart Invite.
- Customize Smart Invite content.
- Secure Smart Invites with the Webhooks.
- Understand GetSocial Analytics for Smart Invites.