George Eracleous
George Eracleous

Reputation: 4422

Can I have multiple twitter oauth callback urls

I have created a Twitter application and specified the following url as the callback url:

http://www.myapp.com/login

However, when a user comes to my site from the url myapp.com (missing the www prefix) the authentication fails.

Apparently, I cannot have multiple urls. So what can be a workaround?

Upvotes: 11

Views: 3875

Answers (1)

driis
driis

Reputation: 164341

You can either

  1. Feed the correct OAuth URL by changing it based on the hostname the user uses to access your app.
  2. Implement a canonical domain name, making sure visitors are redirected to the www version (or vice versa).

No, you cannot feed multiple URLs to the OAuth service.

Upvotes: 6

Related Questions