Closed nomeata closed 5 years ago
Using https://github.com/twitter/twurl it seems that the problem is not speicific to my app or consumer API key…
This seems to fix it:
Credential cred <- authorize tokens getPIN mgr
let cred' = filter (\(k,v) -> k /= "user_id" && k /= "screen_name") cred
return $ setCredential tokens (Credential cred') def
It looks OA.getAccessToken
return extra fields in the resulting credentials that should not be used in requests.
Also reported at https://github.com/yesodweb/authenticate/issues/49
Unfortunately, the repo seems a bit stale (see other opened issues). @himura, do you need help maintaining it?
Sorry for my late reply. Thank you for reporting. I've fixed this issue in https://github.com/himura/twitter-conduit/commit/f2c632055c542cc1bc332aff660221bd7c2d75ef.
I am trying to run code inspired by https://github.com/himura/twitter-conduit/blob/master/sample/simple.hs and indeed I get to enter the PIN and it fetches the credentials, but then all requests fail with Twitter telling me I am not authenticated (
TwitterErrorMessage {twitterErrorCode = 32, twitterErrorMessage = "Could not authenticate you."}
).Sorry for not giving a more helpful bug report… does this work for others or is the sample out of date somehow?