First Question:
You can set a custom Callback URL, but you need to do it at the
correct point in the oAuth process.  You need to pass the callback URL
at the very start of the process, when you are requesting the
"anonymous" token (that you pass to "Sign in with Twitter" as
oauth_token) (depending on which library you are utilizing, this might
be named differently).  The callback URL is set for that token only,
and will be where the user is redirected too from

Second Question:
Because you can now pass a custom URL for callback, you are free to
use whatever domain (and port) you like. You are correct that the
callback URL on the Twitter Application page needs to be legitimate,
but you can use what you want when you set it dynamically.

On Jul 13, 10:07 am, Mathieu Maes <> wrote:
> Hi,
> My company has developed its own CMS which we use to develop websites
> for customers. I'm working on a Twitter plugin to allow people to send
> news to Twitter from within the CMS. For the moment, I'm stuck with
> the authentication part.
> First question:
> When I register an application, I must choose a callback URL. In my
> case it doesn't make much sense, since the application will run on
> each customer's domain (being part of the CMS).
> Should I re-register the application for each implementation, or
> should I use a single key and add domains ?
> Second question:
> I'm working locally on the application. I read it's not possible to
> add "localhost" as a domain. I added a domain ( to my
> hosts file, and created a virtual host in my local Apache httpd.conf.
> This seems to work fine.
> I've set the callback URL tohttp://company.comin the application
> settings, but I'm using the oath_callback parameter to make twitter
> redirect
> This isn't working, Twitter is redirecting to, not the
> given oauth_callback URL. Is there something I'm missing ?
> Kind regards,
> Mathew

Reply via email to