tommeagher / heroku_ebooks

An archive of a script to generate Markov chains and to post to an _ebooks account on Twitter using Heroku. No longer actively supported.
264 stars 163 forks source link

api authentification #57

Closed techdecker closed 2 years ago

techdecker commented 5 years ago

i'm running into this problem while doing "heroku run worker" in terminal I am not sure what to do about this.

screen shot 2018-12-12 at 1 33 30 pm
tommeagher commented 5 years ago

Hey @techdecker, are you still getting this error? For some reason, Twitter isn't recognizing you as a user with the permissions to access to its API. Two culprits would be that you don't have the permissions yet or they aren't being read in from Heroku.

Did you add the POST permissions for your Twitter account at https://dev.twitter.com/apps ? Did you set your API keys as environment variables in Heroku, as in step 13 of the README?

MRLmic commented 5 years ago

I'm having this issue too. @techdecker did this get resolved?

tommeagher commented 5 years ago

Hi @MRLmic, no, @techdecker didn't reply. Did you add the permissions in Twitter and set your environment variables as in step 13?

MRLmic commented 5 years ago

Hi @tommeagher I just did but my error message didn't change.

KiNTan15 commented 5 years ago

i get the same error i add the permissions tokens and i have acces to twitter api

KiNTan15 commented 5 years ago

@tommeagher

nozomiOwo commented 5 years ago

I've been having the same issues, I've done everything correctly, double check plenty of times and this error is still happening, my permissions are set to post, all my Access tokens and consumer API's are entered in both local_settings.py and through the command prompt commands, would love for this to work but this is the only problem I've been getting. Any sort of fix would be appreciated.

nozomiOwo commented 5 years ago

@tommeagher

tommeagher commented 5 years ago

I have a pretty good hunch I know what the problem is. Think it has to do with the version of python-twitter in the requirements file. I’ll try to test a fix and cut a release in the next few days. Can one of you tell me what version of it is being installed when you push to Heroku?

tommeagher commented 5 years ago

OK, so my hunch was wrong. In fact, I'm creating a fresh install of the app from Github and not able to replicate this problem. Which makes me think something in the README is unclear that's causing common confusion about the setup. It makes me think the API keys aren't making their way into Heroku correctly.

@nozomiOwo when you say "all my Access tokens and consumer API's are entered in both local_settings.py and through the command prompt commands", what did you change in local_settings.py?

nozomiOwo commented 5 years ago

notepad _ovyyx8vxm2 image

heres both the command prompt "heroku config" command and the locl_settings.py if you want an idea of what I mean

tommeagher commented 5 years ago

Ahhh, @nozomiOwo, you shouldn’t change those fields in local_settings.py that you’ve blurred out. Those should remain the names of the Heroku config variables. Try changing those back and see if it works. I can update the docs to be more clear about that.

MRLmic commented 5 years ago

Reverting my local_settings.py keys worked!

tommeagher commented 5 years ago

@mrlmic, awesome. I’m glad to hear it. Do you think I can close this issue? Or do you have advice on how to improve the README or local_settings.py to make this easier?

haleykim227 commented 4 years ago

Could you please update the readme with this information? I was trying to resolve the problem for a couple hours until I found this thread. Thank you!

tommeagher commented 4 years ago

hi @haleykim227. What part of the readme do you think we should update? I thought it was clear, but obviously it has been confusing for people and I'd like to make it easier.

The README doesn't say anything about changing the twitter key values, does it? Do you have advice on what could make it easier?

Also, did you come to this from a very old blog post? I know some people find that post which has old outdated instructions, and then comes here. I'm wondering if that's causing some of the confusion.

MisterPoPcorn commented 4 years ago

I'm having this problem, and i can't find a solution. I was getting this problem, so after that i checked my heroku config, and no keys showed up, then i tried to add manually on the heroku website, again didn't work. In this print, on the highlighted part it was with the keys, but then i saw your comment saying you shouldn't mess it up, then i returned to the original text, but still doesn't work, also on twitter dev the permissions are right. Can you help me to see if i am missing something? @tommeagher image

image image

tommeagher commented 4 years ago

@MisterPoPcorn, did you follow step 13 of the setup here? https://github.com/tommeagher/heroku_ebooks/#setup

MisterPoPcorn commented 4 years ago

i missed the don't include quotes part, thank you very much

tommeagher commented 4 years ago

@MisterPoPcorn did that fix it?