Setup Invite Channels on Android

Prerequisite

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.
  • Ones that require integration of 3rd-party SDKs: Facebook and KakaoTalk.

In this step, we will integrate GetSocial with the 3rd-party SDKs.

Setup Integration with Facebook SDK

GetSocial is compatible with Facebook Android SDK v4.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/

  1. Integrate Facebook Android SDK into your app as described in the Official Guide.
  2. Copy implementation of the Facebook Share plugin from GetSocial GitHub repository into your project.
  3. Register plugin with GetSocial:
    1
    2
    3
    4
    5
    CallbackManager facebookCallbackManager = CallbackManager.Factory.create();
    
    GetSocial.registerInviteChannelPlugin(
                InviteChannelIds.FACEBOOK,
                new FacebookSharePlugin((Activity)this, facebookCallbackManager));
    

Setup Integration with VK SDK

Integration does not require VK application installed to be able to send invitations.

  1. Integrate VK Android SDK into your app as described in the Official Guide.
  2. Copy implementation of the VK Invite plugin from GetSocial GitHub repository into your project.
  3. Register plugin with GetSocial:
    1
    2
    3
    GetSocial.registerInviteChannelPlugin(
                InviteChannelIds.VK,
                new VKInvitePlugin((Activity)this));
    

Setup Integration with KakaoTalk SDK

To be able to send Smart Invites via KakaoTalk, GetSocial require: 1) Mobile KakaoTalk application installed and 2) Integration with KakaoTalk SDK.

Following steps will guide you through integration with KakaoTalk SDK:

  1. Integrate KakaoTalk Android SDK into your app as described in the Official Guide. Alternatively (if you are not good with the Korean language), follow the steps below.
    1.1. In your project, open build.gradle.
    1.2. Add KakaoTalk to the list of repositories:

    1
    2
    3
    repositories {
        maven { url 'http://devrepo.kakao.com:8088/nexus/content/groups/public/' }`
    }
    

    1.3. Add dependency to kakaolink library:

    1
    2
    3
    dependencies {
        compile 'com.kakao.sdk:kakaolink:1.0.52'
    }
    

    1.4. Create the new app on Kakao Developers Dashboard.
    1.5. Provide keystore sha1 fingerprint on the Dashboard. To get hash, use the command:

    1
    keytool -exportcert -alias [release_key_alias] -keystore [release_keystore_path] | openssl sha1 -binary | openssl base64
    

    1.5. Add GetSocial Smart Link domain to the list of Site Domains on Kakao Developers Dashboard:

    Kakao Developers Site Domain Configuration

    1.6. In your project, open AndroidManifest.xml.
    1.7. Add a meta-data referencing Kakao App Key to the application element:

    1
    2
    3
    4
    5
    <application android:label="@string/app_name" ...>
        ...
        <meta-data android:name="com.kakao.sdk.AppKey" android:value="[put your app key here]"/>
        ...
    </application>
    
  2. When KakaoTalk SDK is added to the project, let’s integrate it with GetSocial.

  3. Copy implementation of the Kakao Invite plugin from GetSocial GitHub repository into your project.
  4. Register plugin with GetSocial:

    1
    2
    3
    4
    GetSocial.registerInviteChannelPlugin(
                    InviteChannelIds.KAKAO,
                    new KakaoInvitePlugin((Activity)this)
    );
    
  5. To validate integration, open the GetSocial Smart Invites view:

    1
    GetSocialUi.createInvitesView().show();
    

    The list should contain Kakao:

    GetSocial Smart Ivites View

Next Steps

Give us your feedback! Was this article helpful?

😀 🙁