I am trying to write an app that will interact with Last.fm API and I got stuck. My problem is related to authorization. Quote from Last.fm API site:
Your application needs to open an instance of a web browser and send the user to last.fm/api/auth with your API key and authentication token as parameters. Use an HTTP GET request.
I know how to send GET request and how to open the browser with specified URL. But how can I implement this feature and catch with my app event when user approves or disapproves authorization in browser? Maybe I should use HTTP GET for 15 seconds and if I don't receive username I should ask user to perform authorization again. Is this a right way?