开发者

Authenticating using Twitter's OAuth - do I need two Twitter applications? One Development and one Production?

I would like my users of my website to authenticate via Twitter's OAuth system.

Do i need to create TWO applications on the dev.twitter.com site? One for development and one for production?

Why I'm asking is because of the website and callback url text boxes :-

Authenticating using Twitter's OAuth - do I need two Twitter applications? One Development and one Production?

For development, i need to callback to my localhost .. while on live, it should be the live url. Secondly, the website domains are different. On my localhost machine, th开发者_如何学Goe website is localhost.www.pewpew.com while the live one will be www.pewpew.com

So do I need two applications?


No, you don't need to create two applications. You can set your production callback URL in the that field of the application. Then use oauth_callback ( https://www.rfc-editor.org/rfc/rfc5849#section-2.1 ) property of the OAuth actual request to set callback dynamically.

How to set it dependns on the library you use to sign requests, receive token/secret, etc. But Twitter definitely supports it.

Check also these: Twitter O-Auth Callback url, Twitter oauth_callback parameter being ignored!

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜