TikTok OpenSDK for Android is a Gradle project that allows you to integrate with native TikTok app functions. With OpenSDK, you can enable your users to log into your app with TikTok, and then share images and videos to their TikTok profiles.
The minimum system requirement is API level of 21: Android 5.0 (Lollipop) or later.
Register your app on the TikTok for Developers website. You must provide your MD5 and SHA256 certificate fingerprint during the app registration process.
keytool -list -v
-alias <your-key-name> -keystore <path-to-production-keystore>
MD5: 75:C8:69:FC:D5:6E:EB:1D:02:79:A9:3F:91:BD:5E:5B
SHA1: EE:26:47:EC:59:83:6A:91:3C:7A:E1:61:14:56:6D:D8:90:B7:BA:3E
SHA-256: 6C:CF:15:C0:17:2E:EF:3E:48:2F:7E:E8:ED:6D:06:CB:CB:52:A4:CF:AD:CE:42:0B:80:9D:D5:D9:DE:DA:4C:7D
./gradlew signingReport
The signing report includes the signing information for each of your app's variants. Copy the MD5 and SHA-256 of the release variant.
Store: <your_keystore_location>
Alias: <your_keystore_alias>
MD5: 75:C8:69:FC:D5:6E:EB:1D:02:79:A9:3F:91:BD:5E:5B
SHA1: EE:26:47:EC:59:83:6A:91:3C:7A:E1:61:14:56:6D:D8:90:B7:BA:3E
SHA-256: 6C:CF:15:C0:17:2E:EF:3E:48:2F:7E:E8:ED:6D:06:CB:CB:52:A4:CF:AD:CE:42:0B:80:9D:D5:D9:DE:DA:4C:7D
Provide the MD5 and SHA-256 for your app on the TikTok for Developers website.
build.gradle
(Project).repositories {
maven { url "https://artifact.bytedance.com/repository/AwemeOpenSDK" }
}
build.gradle
(Module: app).dependencies{}
section:dependencies {
implementation 'com.tiktok.open.sdk:tiktok-open-sdk-core:2.2.0'
implementation 'com.tiktok.open.sdk:tiktok-open-sdk-auth:2.2.0' // to use authorization api
implementation 'com.tiktok.open.sdk:tiktok-open-sdk-share:2.2.0' // to use share api
}
Note: Due to changes in Android 11 regarding package visibility, when implementing Tiktok SDK for devices targeting Android 11 and higher, add the following to the Android Manifest file.
<queries>
<package android:name="com.zhiliaoapp.musically" />
<package android:name="com.ss.android.ugc.trill" />
</queries>
Sync your project and get the latest version of SDK package. At this point, the basic development environment setup is complete.
If you discover a potential security issue in this project, or think you may have discovered a security issue, please notify TikTok via our Bug Bounty Program. Please do NOT create a public GitHub issue.
This source code is licensed under the license found in the LICENSE file in the root directory of this source tree.