JavaScript working with Twitter API


I’ve got the following situation:

A user that is currently on my web, shares a url(unique e.x. he is on atm, then when someone clicks on this url from twitter, I need to get his(the user that clicked the link) username and image, so I could work with it in JavaScript’s global scope, lets say - to show some Welcome message.

What are the ways of doing it?