Unable to share video to TikTok from my app

Viewed 455

I'm using TikTok's official SDK (https://developers.tiktok.com/doc/video-kit-ios-video-kit-with-swift) to share videos from my app to TikTok. The method I use looks like this:

func openVideoShareMenu(fileUri: String) {
  let request = TikTokOpenSDKShareRequest()
        request.mediaType = TikTokOpenSDKShareMediaType.video
        var mediaLocalIdentifiers: [String] = []
        mediaLocalIdentifiers.append(fileUri)
        request.localIdentifiers = mediaLocalIdentifiers
        DispatchQueue.main.async {
          request.send(completionBlock: { response in
            print("Response from TikTok")
          })
        }
}

The String fileUri points to an existing file and looks like this /var/mobile/Containers/Data/Application/83EB0771-25A6-43A5-9F9F-B859D21DB795/Documents/exportvideo.mp4. The only thing that is happening when executing this method, is that the TikTok app opens, shows a loading animation and then immediately returns to my application. In the log I can see the following output:

realnote_app[25056:2173434] 8.8.0 - [Firebase/Analytics][I-ACS023001] Deep Link does not contain valid required params. URL params: {
    "error_code" = "-4";
    "error_string" = "Permissions denied";
    "from_platform" = tiktoksharesdk;
    "request_id" = "3BEA07B3-19EF-46F1-90B2-8E112748CEA8";
    "response_id" = "51CEF72B-D265-449C-929B-372F2401AA7C";
    "share_state" = 20003;
}

Where the error_code -4 means Auth denied. and the share_state 20003 means Not enough permissions to operation. but I'm currently login in into TikTok. Any ideas?

0 Answers
Related