feat: threads

This commit is contained in:
Nevo David 2024-09-29 19:26:14 +07:00
parent 94157b10ae
commit 98384105b5
1 changed files with 5 additions and 5 deletions

View File

@ -64,11 +64,11 @@ export class ThreadsProvider extends SocialAbstract implements SocialProvider {
'https://graph.threads.net/oauth/access_token' +
`?client_id=${process.env.THREADS_APP_ID}` +
`&redirect_uri=${encodeURIComponent(
process.env.NODE_ENV === 'development' || !process.env.NODE_ENV
? `https://integration.git.sn/integrations/social/threads`
: `${process.env.FRONTEND_URL}/integrations/social/threads${
params.refresh ? `?refresh=${params.refresh}` : ''
}`
`${
process?.env.FRONTEND_URL?.indexOf('https') == -1
? `https://redirectmeto.com/${process?.env.FRONTEND_URL}`
: `${process?.env.FRONTEND_URL}`
}/integrations/social/threads`
)}` +
`&grant_type=authorization_code` +
`&client_secret=${process.env.THREADS_APP_SECRET}` +