"Website: Not a valid URL format" when creating an application of twitter
I'd like to cr开发者_如何学Pythoneate an application that can integrate with Twitter. So I went to the website: https://dev.twitter.com/apps/new to create an application.
But the WebSite: field always failed. It said that "Website: Not a valid URL format". I tried different "valid" URLs, but failed.
Do you have any ideas on the twitter application?
Thanks in advance. Michael
I was trying to set localhost URL and got the same error message.
After replacing
http://localhost
http://localhost
/twitter/callback
with
http://127.0.0.1
http://127.0.0.1
/twitter/callback
it let me saved my test application
Mine is working. Save it in this format http://url.com
. Even this domain.com
works.
You can try doing it in a different browser, logout and login.
In my case the problem was in trailing whitespace from copy/paste.
One easy mistake to make is both the callback url and website need to start with http://
This worked for me:
WebSite: http://example.com
CallbackURL: http://example.com/auth/twitter/callback/
I'm able to make applications if I include "http://" at the beginning. Also it might be something browser related (I'm using Chrome) so check that.
I was having the same Issue, then after googling, someone said that:
"I think your website and callback should match. Some examples:
website: http://www.quoteicon.com callback: http://www.quoteicon.com/twitter/callback "
summarizing the field callback has to be prefixed with the website, otherwise it gets error that the URL is invalid! and they dont accept local IPs to the webSite fields.
It worked for me, hope this help you.
Old question but I ran into this today. Twitter does not allow localhost or IP addresses in the URL (plus it does require http:// or https:// as a prefix).
However this doesn't help with local debugging.
So an easy workaround is to add something like myapp.here.com in your /etc/hosts file
127.0.0.1 myapp.here.com
and then enter http://myapp.here.com and http://myapp.here.com/auth/twitter in the fields.
That should allow local debugging. It is odd as Facebook makes this a bit easier and it seems like a common task for debugging these types of integrations.
You could even override your actual domain locally if you wanted to use the same Twitter App ID.
Be aware of localhost, if you are developing on local machine. Twitter doesn't allow url with http://localhost:3000
or without http.
I'm wonder, why ;] Hope, They will add it.
I just found that I didn't have a problem with my callback url at all, but the error message was for the Website url!
Tried everything now, eventually only https://example.com/auth
worked.
I simply added www and the error was gone.
Previously http://twitter.com/...
After http://www.twitter.com/...
This issue is resolved when I give my Website & Callback URL same htt://URL.Hope it will help to resolve your solution.
精彩评论