Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Twitter App not taking localhost and 127.0.0.1 as CallbackUrl

I am developing an Application on my localhost environment. Where I want to implement Twitter OAuth functionality in PHP. So I just went on dev.twitter.com and was trying to create an app but its not allowing me to pass Callback URL as localhost or 127.0.0.1.

1) Firstly I tried as localhost

Callback URL as localhost

2) Then I tried as localhost/demoproject

Callback URL as localhost with projectname

3) After I tried IP with project name

Callback URL as IPAddress with projectname

But its taking it as a invalid callback/url format.

Error

Is there any way to deal with this?

Thanks

like image 957
J.K.A. Avatar asked Jan 17 '13 04:01

J.K.A.


People also ask

What is a callback URL for Twitter app?

As users work through these flows, they need a web page or location to be sent to after they have successfully logged in and provided authorization to the developer's App. This follow-up webpage or location is called a callback URL.

How do I get my twitter callback URL?

Enable 3rd Party Application in TwitterClick "App Settings". Scroll down to your app and click the settings (cog) icon. Scroll down to "Authentication settings" and click "Edit". Toggle "Enable 3-legged OAuth" to be on, and we'll need to fill in two properties, Callback URLs and Website URL .

What is callback URI redirect URL?

The callback URLs, also known as redirect URIs, tell the server where to send the user with the proper tokens after authentication. For purposes within Skuid, you'll want the end user sent back to the Skuid site/org accessing the data.

What is a callback URL?

Callback URLs are the URLs that Auth0 invokes after the authentication process. Auth0 redirects back to this URL and appends additional parameters to it, including an access code which will be exchanged for an id_token , access_token and refresh_token .


1 Answers

For localhost, use the following URLs in your dev.twitter.com application setup:

Website URL: http://127.0.0.1:8000/twitter/oauth
Callback URL: http://127.0.0.1:8000/twitter/oauth

And don’t worry, these are just placeholders, as long as your code sends the correct callback URL when it connects, things ought to work...

like image 190
Boriana Ditcheva Avatar answered Oct 13 '22 03:10

Boriana Ditcheva