0

In my project i want to access public timeline of twitter users using the oauth token which i have already stored in database. i tried using python-twitter app but it has some issues with Twitter api 1.1. the following is the issue i was facing with python-twitter :-

Traceback (most recent call last):
 File "<console>", line 1, in <module>
 File "C:\Users\Teja\Envs\icon\Lib\site-packages\twitter.py", line 2301, in GetPublicTimeline
 hashtags. [Optional]
 File "C:\Users\Teja\Envs\icon\Lib\site-packages\twitter.py", line 620, in NewFromJsonDict
 if 'user_mentions' in data['entities']:
 AttributeError: 'unicode' object has no attribute 'get'

So Anyone can help me with this issue or suggest any other app by which i can access tweets?

Satya Teja
  • 616
  • 6
  • 18
  • You did not show your full code and from what I see, it does not look like `python-twitter`'s error. You can see the appropriate lines of code here, showing this error should not originate in the module: http://code.google.com/p/python-twitter/source/browse/twitter.py#620 – Tadeck Nov 30 '12 at 12:19
  • actually http://code.google.com/p/python-twitter/issues/detail?id=144#c6 this is the error i am getting in version 0.8.2 so i updated it to 0.8.3 which was on github and i am getting the error mentioned above in the question – Satya Teja Nov 30 '12 at 12:24
  • It really looks like the change in the API of Twitter, the fix should be easy, so why not submit a pull request? You probably based your whole site on it already, so I believe this will be the easiest approach. – Tadeck Nov 30 '12 at 12:36

1 Answers1

2

I use twit: https://github.com/ttezel/twit

The author updated it to support v1.1 not too long ago. Works well.

mkoistinen
  • 7,724
  • 3
  • 41
  • 56
  • 1 up for your effort but this app doesn't suit my requirements. i want this to be done in the backend(i.e using django,python not javascript). – Satya Teja Dec 03 '12 at 09:15
  • Now that I'm looking at my response, I think you were generous with your +1 =) It was late when I posted this =) – mkoistinen Dec 03 '12 at 16:57