One twitter app to handle multiple dev environments


#1

Hi,

Reading the documentation, it allows for usage of a TDL as the callback URL. With this in mind, we use a preview branch of development as well as a live production branch. Is there a way that I could use one Twitter app with a generic callback (maybe using a TDL with a wildcard)? I would need this for authentication.

For example. I have the following sites:

dev: http://foo.dev.domain.com
live: http://foo.domain.com

I have another:
dev: http://bar.dev.domain.com
live: http://bar.domain.com

I have twitter apps for http://foo.domain and another for http://bar.domain.com

I know I can create two more for the dev environment(4 apps), but is it possible to have one app to handle both (3 apps) for testing purposes? This would be a great time saver in terms of scalability.

Any help is appreciated.

Thanks, Thanh


Twitter app to handle multiple domains
#2

You can use a single application for all of your environments. Keep a callback specified on your application record as a place-holder, then dynamically set your environment’s oauth_callback value on the oauth/request_token step.


#3