def get_xauth_access_token(self, username, password):
try:<EOL><INDENT>url = self._get_oauth_url('<STR_LIT>')<EOL>oauth = OAuth1(self.consumer_key,<EOL>client_secret=self.consumer_secret)<EOL>r = requests.post(url=url,<EOL>auth=oauth,<EOL>headers={'<STR_LIT>': '<STR_LIT>',<EOL>'<STR_LIT>': username,<EOL>'<STR_LIT>': password})<EOL>credentials = parse_qs(r.content)<EOL>return credentials.get('<STR_LIT>')[<NUM_LIT:0>], credentials.get('<STR_LIT>')[<NUM_LIT:0>]<EOL><DEDENT>except Exception as e:<EOL><INDENT>raise TweepError(e)<EOL><DEDENT>
Get an access token from an username and password combination.
In order to get this working you need to create an app at
http://twitter.com/apps, after that send a mail to api@twitter.com
and request activation of xAuth for it.