Closed GoogleCodeExporter closed 9 years ago
I tried running tests and got a lot of errors in the twiiter.Api methods.
Attached is the output of the tests.
Original comment by esakafor...@gmail.com
on 25 Jun 2011 at 10:08
Attachments:
Googled a bit more and found that the problem with the tests is because
resource files are not included in the archive. Cloned the source repository
and all test errors excepting one are gone:
======================================================================
ERROR: Test the twitter.Api GetFollowers method
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/jalon/pytw/python-twitter/twitter_test.py", line 408, in testGetFollowers
users = self._api.GetFollowers(page=1)
TypeError: GetFollowers() got an unexpected keyword argument 'page'
----------------------------------------------------------------------
My problem with tweet.py is still there. I get only the help page whatever I
try.
Original comment by esakafor...@gmail.com
on 25 Jun 2011 at 10:28
I solved the problem. There is nothing wrong with your library, it's just I was
too stupid to figure out the process required to register the application. I
think it would be great to detail the process in the documentation, something
like this:
To be able to use python-tweeter
1.- Register a new application in twitter to get consumer key and consumer
secret. Be sure to chante the permissions given to the app as you wish. In
Application Type enter check "Client". When you complete this step, you will be
given consumer key and consumer secret numbers.
2.- Edit get_access_token.py and assign the consumer key and secret numbers:
consumer_key = 'obtained_consumer_key'
consumer_secret = 'obtained_consumer_secret'
3.- Execute get_access_token.py script. It will request you to go to a webpage.
Copy the URL, paste it in the browser and when the page appears, grant access
to the application. You will be given a PIN code. Input the PIN code to the
get_access_token.py script. The script will give you your access token key and
secret.
4.- Now you have the four needed parameters to authenticate your application.
Use your preferred method to pass them to tweet.py. For example edit .tweetrc
in your home directory and add these five lines:
[Tweet]
consumer_key: your_consumer_key_obtained_in_step_1
consumer_secret: your_consumer_secret_obtained_in_step_1
access_key: your_access_key_obtained_in_step_3
access_secret: your_access_secret_obtained_in_step_3
Original comment by esakafor...@gmail.com
on 25 Jun 2011 at 11:25
Almost everyone gets that part wrong if they are not a regular twitter dev -
coming from the original way of using command line twitter tools to this way is
not obvious.
I'm glad you were able to figure it out.
Original comment by bear42
on 26 Jun 2011 at 8:57
Original issue reported on code.google.com by
esakafor...@gmail.com
on 25 Jun 2011 at 9:36