Closed ghost closed 6 years ago
Can confirm that making a rest api request using mrjones/oauth Consumer.Get with the same consumer key/secret + user token/secret works. Twitter accepts the authentication, and returns data.
I know I'm months late, but why not just use the buit-in oauth in anaconda?
authUrl, tmpCred, err := anaconda.AuthorizationURL("oob")
if err != nil {
log.Fatal(err)
}
exec.Command("xdg-open", authUrl).Run()
fmt.Printf(
"1. Go to %s (should have opened automatically)\n"+
"2. Authorize the application\n"+
"3. Enter verification code: ", authUrl,
)
var pin string
fmt.Scanln(&pin)
cred, _, err := anaconda.GetCredentials(tmpCred, pin)
if err != nil {
log.Fatal(err)
}
api = anaconda.NewTwitterApi(cred.Token, cred.Secret)
api.SetLogger(anaconda.BasicLogger)
res, err := api.GetTweet(634839419317456896, nil)
if err != nil {
log.Fatal(err)
}
Looks like this wasn't an issue with anaconda then? Closing this issue, but feel free to comment if you still need clarification. Thanks!
I can authenticate w/ mrjones/oauth and store the user token/secret, but after that when trying to use anaconda for any api requests just results in the error below.
I've verified that the consumer key/secret, and user token/secret are referenced correctly, but anaconda just does not want to work for me. Am I doing something obviously wrong here?