SocialShare Documentation.

For more information, visit our website @ www.sdkbox.com

Importing SDKBOX SocialShare

First import the sdkbox_socialshare unity package into your project. This will create two directories(Plugins and SDKBOX) in Assets.

To begin using SocialShare, find the SocialShare prefab in the Assets/SDKBOX/socialshare directory.

Create an instance of the SocialShare prefab in the scene where you want to use the SocialShare package. You should only have a single instance of this prefab at any time.

Select the SocialShare game object in the hierarchy and in your inspector pane you can configure the object to customize the SocialShare dialog.

Configuring the Review Plugin

Description of Fields

Config

Twitter Key iOS

This specifies twitter key of ios platform, if none, will not show in share panel on ios.

Twitter Secret iOS

This specifies twitter secret of ios platfoorm, if none, will not show in share panel on ios.

Twitter Key Android

This specifies twitter key of android platform, if none, will not show in share panel on android.

Twiiter Secret Android

This specifies twitter secret of android platform, if none, will not show in share panel on android.

facebook enable

This specifies if facebook show in share panel.

Social Panel Title

This specifies social panel custom title

Social Panel Cancel

This specifies social panel custom cancel button

Handling SocialShare Events

In the Callbacks section of the SocialShare script inspector pane, you can click + to add a subscriber, and specify the object, and method that you would like to have invoked.

SocialShare API

void setSharePanelTitle(string s)
void setSharePanelCancel(string s)
void share(SocialShareInfo info)

Manual Setup

IOS Platform
<key>FacebookAppID</key>
<string>280194012150923</string>
<key>FacebookDisplayName</key>
<string>helloworld - Test1</string>
<key>CFBundleURLTypes</key>
<array>
    <dict>
        <key>CFBundleTypeRole</key>
        <string>Editor</string>
        <key>CFBundleURLSchemes</key>
        <array>
            <string>fb280194012150923</string>
        </array>
    </dict>
</array>
<key>LSApplicationQueriesSchemes</key>
<array>
    <string>fbapi</string>
    <string>fb-messenger-api</string>
    <string>fbauth2</string>
    <string>fbshareextension</string>
</array>

#import <TwitterKit/TWTRKit.h>

- (BOOL)application:(UIApplication *)app
            openURL:(NSURL *)url
            options:(NSDictionary<UIApplicationOpenURLOptionsKey, id> *)options {
    return [[Twitter sharedInstance] application:app openURL:url options:options];
}
Android Platform

when build android, you need the follow two modify

<provider android:authorities="com.facebook.app.FacebookContentProvider280194012150923"
            android:name="com.facebook.FacebookContentProvider"
            android:exported="true" />
<resources>
    <string name="facebook_app_id">280194012150923</string>
    ....
</resources>

Additional iOS Instructions

On some older versions of Unity, the static libraries in Review/Assets/Plugins/iOS do not get included in the Xcode project. In this case they need to be moved to Assets/Plugins/iOS or added to the Xcode project manually.

Trouble Shoot

if your unity project contains multiple android-support-v4.jar files, when you compile android, will get error. In this case, under normal circumstances, you can delete the android-support-v4.jar file, leaving only one