diff --git a/apps/frontend/src/components/launches/providers/tiktok/tiktok.provider.tsx b/apps/frontend/src/components/launches/providers/tiktok/tiktok.provider.tsx
index 6f2ca47c..58d0db42 100644
--- a/apps/frontend/src/components/launches/providers/tiktok/tiktok.provider.tsx
+++ b/apps/frontend/src/components/launches/providers/tiktok/tiktok.provider.tsx
@@ -33,6 +33,17 @@ const privacyLevel = [
},
];
+const contentPostingMethod = [
+ {
+ value: 'DIRECT_POST',
+ label: 'Post content directly to TikTok',
+ },
+ {
+ value: 'UPLOAD',
+ label: 'Upload content to TikTok without posting it',
+ },
+];
+
const yesNo = [
{
value: 'true',
@@ -109,12 +120,16 @@ const TikTokSettings: FC<{ values?: any }> = (props) => {
const disclose = watch('disclose');
const brand_organic_toggle = watch('brand_organic_toggle');
const brand_content_toggle = watch('brand_content_toggle');
+const content_posting_method = watch('content_posting_method');
+
+ const isUploadMode = content_posting_method === 'UPLOAD';
return (
= (props) => {
))}
+
+ {`Choose upload without posting if you want to review and edit your content within TikTok's app before publishing.
+ This gives you access to TikTok's built-in editing tools and lets you make final adjustments before posting.`}
+
+
+ Select
+ {contentPostingMethod.map((item) => (
+
+ {item.label}
+
+ ))}
+
Allow User To:
= (props) => {
= (props) => {
= (props) => {
= (props) => {
)}
- Turn on to disclose that this video promotes good or services in
+ Turn on to disclose that this video promotes goods or services in
exchange for something of value. You video could promote yourself, a
third party, or both.
@@ -193,6 +230,7 @@ const TikTokSettings: FC<{ values?: any }> = (props) => {
= (props) => {
{
const [firstPost, ...comments] = postDetails;
-
const {
data: { publish_id },
} = await (
await this.fetch(
- 'https://open.tiktokapis.com/v2/post/publish/video/init/',
+ `https://open.tiktokapis.com/v2/post/publish${this.postingMethod(firstPost.settings.content_posting_method)}`,
{
method: 'POST',
headers: {
@@ -238,15 +247,17 @@ export class TiktokProvider extends SocialAbstract implements SocialProvider {
Authorization: `Bearer ${accessToken}`,
},
body: JSON.stringify({
- post_info: {
- title: firstPost.message,
- privacy_level: firstPost.settings.privacy_level,
- disable_duet: !firstPost.settings.duet,
- disable_comment: !firstPost.settings.comment,
- disable_stitch: !firstPost.settings.stitch,
- brand_content_toggle: firstPost.settings.brand_content_toggle,
- brand_organic_toggle: firstPost.settings.brand_organic_toggle,
- },
+ ...(firstPost.settings.content_posting_method === 'DIRECT_POST' ? {
+ post_info: {
+ title: firstPost.message,
+ privacy_level: firstPost.settings.privacy_level,
+ disable_duet: !firstPost.settings.duet,
+ disable_comment: !firstPost.settings.comment,
+ disable_stitch: !firstPost.settings.stitch,
+ brand_content_toggle: firstPost.settings.brand_content_toggle,
+ brand_organic_toggle: firstPost.settings.brand_organic_toggle,
+ }
+ } : {}),
source_info: {
source: 'PULL_FROM_URL',
video_url: firstPost?.media?.[0]?.url!,