Authorize via code, possible?


#1

Usually twitter applications work like this: [service] --> user wants to use it on their own behalf --> authorizes --> make status update on user behalf.

I want something different though. I would like a user to use the application to tweet on behalf of the application. So the user will make a status update on behalf of the application. The problem is, I have this form and application all setup now, using twitteroauth and everytime I hit ‘submit’ (and the browser is cleared from all cache/data) twitter prompts me to authorize it. I want it to be authorized at all times, done only once by me!

is that even possible?!


#2

Yes, if I understand correctly, you have a Twitter account for the application which you want all users to Tweet on behalf of. In that case you would just generate an access token + secret for that account, and use that value for all requests to the Twitter API. There’s really not even a need to have an auth flow implemented - the keys you need can be generated in the application settings page.


#3

Thanks! I see that now too!