Twitter @anywhere login implementation



I’m new to Twitter @anywhere. Is @anywhere login feature is intended to integrate our website with Twitter login? just like Facebook connect?
If yes, What is the callback url used for and what callback url should be provided?

I’ve tried to add this @anywhere login feature to my site and I’m testing it from a localhost / site. I use the following code

twttr.anywhere(function (T) {	
	   		authComplete: function(user) {
        		//triggered when auth completed successfully
                        alert('test login complete');

        		currentUser = T.currentUser;        		
				var userInfo = document.getElementById('user-info');
				userInfo.innerHTML = 
					'<img src="' +'profile_image_url') + '"/>' 

If I don’t provide any callback url, after authorizing the user, Twitter give a

Sorry, something went wrong.
The provided callback url http://localhost:9000/ is not authorized for the client registered to ''.

So then I provide a custom callback url with the following code twttr.anywhere.config({ callbackURL: “”});

After adding that code, no error occurred but I ended up having two tabs opened of the same page. One is the page I use to login and the other one is the callback url page. And also the code inside the “authComplete:” section is not run, the alert is not shown.

Did I do anything wrong?

Thank you


You have to add to the list of authorized callback domains. Go to, sign in there, click your username on top right corner, go to “My applications”, choose your application, go to “@Anywhere domains” and add there.

Also, here is a blog-post about using @Anywhere with PHP Symfony, if you’re interested in.

It’s not 100% up-to-date, but still can provide you good perspective of how this works in general.



Sorry, something went wrong.
Small_robot The provided callback url is not authorized for the client registered to ‘’.

i am getting this error , can anyone help me for this error to solve ?