开发者

Twitter Oauth problem - I need a website to register an app

开发者 https://www.devze.com 2023-03-15 21:11 出处:网络
I need to use Oauth for a personal twitter script I am making. Its not commercial or a开发者_Go百科nything like that. To register it here: https://dev.twitter.com/apps/new I need a website even though

I need to use Oauth for a personal twitter script I am making. Its not commercial or a开发者_Go百科nything like that. To register it here: https://dev.twitter.com/apps/new I need a website even though it is a client. It wont let me register my app without a website.

Is there anything I can do? If I just created a blog that explains the concept behind the script I am using - would they accept that and let me register the "app" (just a script I use?).


If it is just for personal use, you could put pretty much any url in that field. As far as I know it isn't double checked or subjected to approval.


Choose Client here:

Twitter Oauth problem - I need a website to register an app

In place of Application Website you can put any link. Its just the link-back url.


As mentioned above, the callback URL can be anything, but I would choose Browser, not Client, because Twitter lets you override the value of Application Website with the parameter oauth_callback. This lets you automate the final step of the OAuth flow.

Usually, since you are running a script, you would need to set oauth_callback=oob and put the user through PIN authentication, which sucks. Here is an alternative:

  • Choose Browser and set Application Website to http://www.whatever.com (doesn't matter).
  • Register your script with your operative system to handle a custom scheme, eg: myscript://
  • Pass oauth_callback=myscript://anystring during the OAuth flow.

The result is that once the user is authenticated, Twitter calls myscript://anything from the web browser with the two last parameters you need for the final authentication step, and the OAuth flow will complete without user interaction.

0

精彩评论

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