Whatever happens when the user logs into twitter with a conventional browser to get an api key is something you could do in your script.
Whatever happens when the user logs into twitter with a conventional browser to get an api key is something you could do in your script.