Skip to content

Setup Invite Channels on iOS

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, Kik, Line, Twitter, Facebook;
  • Ones that require integration of 3rd-party SDKs: Messenger, and KakaoTalk.

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 iOS 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 GetSocialFacebookInvitePlugin with GetSocialFacebookSharePlugin .

More: https://blog.getsocial.im/facebook-deprecates-app-invites-are-you-ready/

  1. Integrate Facebook iOS 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:

    ```objc tab=”Objective-C”
    GetSocialFacebookSharePlugin *fbSharePlugin = [[GetSocialFacebookSharePlugin alloc] init];
    [GetSocial registerInviteChannelPlugin:fbSharePlugin forChannelId:GetSocial_InviteChannelPluginId_Facebook];

    ```swift tab="Swift"
    let fbSharePlugin = GetSocialFacebookSharePlugin()
    GetSocial.register(fbSharePlugin, forChannelId: GetSocial_InviteChannelPluginId_Facebook)
    

  4. To validate integration, open Smart Invites View:

    ```objc tab=”Objective-C”
    [[GetSocialUI createInvitesView] show];

    ```swift tab="Swift"
    GetSocialUI.createInvitesView().show()
    

    Check if Facebook is listed there:

    GetSocial Smart Ivites View

If you want to check Facebook’s referral data on your own, use the following parameter with getsocial.sh script:

"$PROJECT_DIR/getsocial.sh" ... --disable-facebook-referral-check="true"

Setup Integration with VK SDK

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

  1. Integrate VK iOS 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:

    ```objc tab=”Objective-C”
    GetSocialVKInvitePlugin *vkInvitePlugin = [[GetSocialVKInvitePlugin alloc] init];
    [GetSocial registerInviteChannelPlugin:vkInvitePlugin forChannelId:GetSocial_InviteChannelPluginId_VK];

    ```swift tab="Swift"
    let vkInvitePlugin = GetSocialVKInvitePlugin()
    GetSocial.register(vkInvitePlugin, forChannelId: GetSocial_InviteChannelPluginId_VK)
    

Setup Integration with Facebook Messenger

  1. Integrate Facebook iOS SDK into your app as described in the Official Guide.
  2. Copy implementation of the Facebook Messenger Invite plugin from GetSocial GitHub repository into your project.
  3. Register plugin with GetSocial:

    ```objc tab=”Objective-C”
    GetSocialFBMessengerInvitePlugin *fbMessengerInvitePlugin = [[GetSocialFBMessengerInvitePlugin alloc] init];
    [GetSocial registerInviteChannelPlugin:fbMessengerInvitePlugin forChannelId:GetSocial_InviteChannelPluginId_Facebook_Messenger];

    ```swift tab="Swift"
    let fbMessengerInvitePlugin = GetSocialFBMessengerInvitePlugin()
    GetSocial.register(fbMessengerInvitePlugin, forChannelId: GetSocial_InviteChannelPluginId_Facebook_Messenger)
    

  4. To validate integration, open Smart Invites View:

    ```objc tab=”Objective-C”
    [[GetSocialUI createInvitesView] show];

    ```swift tab="Swift"
    GetSocialUI.createInvitesView().show()
    

    Check if Facebook Messenger is listed there:

    GetSocial Smart Invites View

Setup Integration with Facebook Stories

  1. Integrate Facebook iOS SDK into your app as described in the Official Guide.
  2. Make sure, that the stories provider is enabled at Dashboard

Setup Integration with Twitter SDK

Twitter integration and iOS 11

With the release of iOS 11 third-party accounts are not supported anymore, so sharing with Twitter requires Twitter SDK.

  1. Integrate Twitter iOS SDK into your app as described in the Official Guide.
  2. Copy implementation of the Twitter Invite plugin from GetSocial GitHub repository into your project.
  3. Register plugin with GetSocial:

    ```objc tab=”Objective-C”
    GetSocialTwitterInvitePlugin *twitterInvitePlugin = [[GetSocialTwitterInvitePlugin alloc] init];
    [GetSocial registerInviteChannelPlugin:twitterInvitePluugin forChannelId:GetSocial_InviteChannelPluginId_Twitter];

    ```swift tab="Swift"
    let twitterInvitePlugin = GetSocialTwitterInvitePlugin()
    GetSocial.register(twitterInvitePluugin, forChannelId: GetSocial_InviteChannelPluginId_Twitter)
    

  4. To validate integration, open Smart Invites View:

    ```objc tab=”Objective-C”
    [[GetSocialUI createInvitesView] show];

    ```swift tab="Swift"
    GetSocialUI.createInvitesView().show()
    

    Check if Twitter is listed there:

    GetSocial Smart Invites View

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 iOS SDK into your app as described in the Official Guide. Alternatively (if you’re not good with Korean language), follow the steps below.
    1.1. Download the latest sdk.
    1.2. Add the binaries to your project.
    1.3. Create the new app on Kakao Developers Dashboard.
    1.4. Add iOS Bundle Id and Apple App Id on Kakao Developers Dashboard:

    Kakao Developers Site iOS Configuration

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

    Kakao Developers Site Domain Configuration

    1.6. Open your application’s Info.plist file.
    1.7. Add KAKAO_APP_KEY :

    <key>KAKAO_APP_KEY</key>
    <string>[put your kakao app key here]</string>
    

    Do not forget to put correct Kakao app key.

    1.8. Add the Kakao’s URL scheme to LSApplicationQueriesSchemes.

    <key>LSApplicationQueriesSchemes</key>
    <array>
        <string>kakao[put your kakao app key here]</string>
    <array>
    

    Do not forget to update the URL with your Kakao app key.

  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:

    ```objc tab=”Objective-C”
    GetSocialKakaoTalkInvitePlugin *kakaoTalkPlugin = [[GetSocialKakaoTalkInvitePlugin alloc] init];
    [GetSocial registerInviteChannelPlugin:kakaoTalkPlugin forChannelId:GetSocial_InviteChannelPluginId_Kakao];

    ```swift tab="Swift"
    let kakaoTalkPlugin = GetSocialKakaoTalkInvitePlugin()
    GetSocial.register(kakaoTalkPlugin, forChannelId: GetSocial_InviteChannelPluginId_Kakao)
    

  5. To validate integration, open the GetSocial Smart Invites view:

    ```objc tab=”Objective-C”
    [[GetSocialUI createInvitesView] show];

    ```swift tab="Swift"
    GetSocialUI.createInvitesView().show()
    

    The list should contain Kakao:

    GetSocial Smart Ivites View

Next Steps

Give us your feedback! Was this article helpful?

😀 🙁