getting type errors with TokenResponse
hedcet opened this issue · comments
I'm getting some type
error with the destructuring assignment
maybe error in here https://github.com/draftbit/twitter-lite/blob/master/index.d.ts#L158
Please try this:
const oauthResult = await client.getRequestToken(callbackUrl)
if (oauthResult.oauth_callback_confirmed === 'true') {
// in this scope you can access oauth_token and oauth_token_secret
console.log(oauthResult.oauth_token)
} else {
// in this scope oauth_token and oauth_token_secret are not available
throw new Error('oauth_callback_confirmed is not "true".')
}