When you edit your app settings at Twitter.com, you can asked for a return url, but you can set it to localhost/return. Can you?
I think this is useful in developing tim
Set your callback url in twitter app setting to http://127.0.0.1/.
http://127.0.0.1/