Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

service stopped working #2

Open
spacedw opened this issue Jul 12, 2023 · 5 comments
Open

service stopped working #2

spacedw opened this issue Jul 12, 2023 · 5 comments

Comments

@spacedw
Copy link

spacedw commented Jul 12, 2023

now the threads api requires a header and an additional parameter to continue working this service

Captura de pantalla 2023-07-11 a la(s) 7 33 48 p m

solution to this:
added a header and parameter lsd

//in consts.ts
export const THREADS_FB_LSD = "jdFoLBsUcm9h-j90PeanuC"


//in fetch.js
const fetchBase = ({ documentId, variables }) => {
  return fetch(GRAPHQL_ENDPOINT, {
    method: 'POST',
    headers: {
      'content-type': 'application/x-www-form-urlencoded',
      'user-agent': 'Threads API midu client',
      'x-ig-app-id': THREADS_APP_ID,
      'x-fb-lsd': THREADS_FB_LSD
    },
    body: `variables=${JSON.stringify(variables)}&doc_id=${documentId}&lsd=${THREADS_FB_LSD}`
    })
  .then(response => response.json())
}
@devdariill
Copy link

are u using windows?

@devdariill
Copy link

#3

@spacedw
Copy link
Author

spacedw commented Jul 12, 2023

are u using windows?

Mac - Apple Silicon M2

@devdariill
Copy link

try adding the #3

@spacedw
Copy link
Author

spacedw commented Jul 12, 2023

try adding the #3
Yes, I managed to correct it locally, I just picked it up here in case anyone else had that problem

const fetchBase = ({ documentId, variables }) => {
  return fetch(GRAPHQL_ENDPOINT, {
    method: 'POST',
    headers: {
      'content-type': 'application/x-www-form-urlencoded',
      'user-agent': 'Threads API midu client',
      'x-ig-app-id': THREADS_APP_ID,
      'x-fb-lsd': THREADS_FB_LSD
    },
    body: `variables=${JSON.stringify(variables)}&doc_id=${documentId}&lsd=${THREADS_FB_LSD}`
    })
  .then(response => response.json())
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants