danielpronych / python-twitter

Automatically exported from code.google.com/p/python-twitter
Apache License 2.0
0 stars 0 forks source link

TypeError: PostUpdate() takes at most 3 arguments (4 given) #145

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
>>> api = twitter.Api()

>>> api.PostUpdate('username', 'password', 'I love python-twitter!')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: PostUpdate() takes at most 3 arguments (4 given)

Password has special characters in it.

uname -a
Linux ubuntu 2.6.32-21-generic-pae #32-Ubuntu SMP Fri Apr 16 09:39:35 UTC 2010 
i686 GNU/Linux

Version Details :
Python 2.6.5
python-twitter-0.6

Original issue reported on code.google.com by hemanth...@gmail.com on 30 Jun 2010 at 8:36

GoogleCodeExporter commented 8 years ago
Hello.

I believe this to be invalid.

The signature of PostUpdate is:
  def PostUpdate(self, status, in_reply_to_status_id=None)

Which means that your calls should be
>>> api = twitter.Api(username='user', password='password')
>>> api.PostUpdate(I love python-twitter!')

Regards!

Original comment by nicd...@gmail.com on 30 Jun 2010 at 8:46

GoogleCodeExporter commented 8 years ago
I was confused about this:
>>> status = api.PostUpdate(username, password, 'I love python-twitter!')
>>> print status.text
I love python-twitter!
Mentioned in the example.

Original comment by hemanth...@gmail.com on 30 Jun 2010 at 8:56

GoogleCodeExporter commented 8 years ago

Original comment by bear42 on 16 Oct 2010 at 8:12