[twitter-dev] Re: CMS application on each domain

2010-07-13 Thread iAn
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 twitter.com

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 (www.test.com) 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 towww.test.com/file.php.
> This isn't working, Twitter is redirecting to company.com, not the
> given oauth_callback URL. Is there something I'm missing ?
>
> Kind regards,
> Mathew


[twitter-dev] Re: CMS application on each domain

2010-07-13 Thread Mounir Regragui
If you want special callback URIs, you should email the api support
team.

On 13 juil, 11:07, 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 (www.test.com) 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 towww.test.com/file.php.
> This isn't working, Twitter is redirecting to company.com, not the
> given oauth_callback URL. Is there something I'm missing ?
>
> Kind regards,
> Mathew