Twitter: Difference between revisions

imported>Brittag
(note about page being outdated)
imported>Konarkmodi
Line 23:
 
<pre>pip install httplib2 simplejson oauth2 python-twitter</pre>
 
The python-twitter library now only supports oAuth authentication as the Twitter devs have indicated that OAuth is the only method that will be supported moving forward. So make sure in order to use the Twitter App you have the following with you:
* consumer_key
* consumer_secret
* access_token_key
* access_token_secret
 
Registration Process:
* Log in to Twitter Developer Site [https://dev.twitter.com/apps/new] with your regular Twitter username and password.
* Create a new Twitter application. Few problems I faced during the registration: a)The website URL has to start with http:// b)You don't need to specify Callback URL. If you do any POST actions, you must set access to Read & Write.
* Write down the below credentials Twitter just created for your application (you'll need them later on): Consumer key Consumer secret
* At the end of the page there is a button - "Create my Access Token" , click on this to generate the access_token_key and access_token_secret. Once you get the confirmation that your app's access tokens have been created you can go to the "OAuth tool" tab on the same page and all your app's credentials will be listed and are to be kept confidential.
 
Once you have the above mentioned details, you can use the skeleton code shared below.
 
=== Download and un-archive the Twitter project skeleton code ===
Anonymous user