Questions tagged [python-twitter]

A Python wrapper around the Twitter API

This library provides a pure Python interface for the Twitter API.

Twitter provides a service that allows people to connect via the web, IM, and SMS. Twitter exposes a web services API and this library is intended to make it even easier for Python programmers to use.

151 questions
2
votes
1 answer

GetUserTimeline can not return ones all timeline

I am using python-twitter library, but I am unable to get all the timeline of a specified user. api = twitter.Api(consumer_key='', consumer_secret='', access_token_key='', …
Marco
  • 131
  • 1
  • 7
2
votes
0 answers

python-twitter not accepting strings that are < 140 char with no links

I'm working on a home automation project that uses python-twitter to post update information. When I try to post a shorter-than-140 string with no links, I end up getting a TwitterError: Text must be less than or equal to 140 characters. Here's some…
Ian
  • 172
  • 1
  • 13
2
votes
2 answers

How do I delete all tweets using python-twitter?

I'm using python-twitter in my Web Application to post tweets like this: import twitter twitter_api = twitter.Api( consumer_key="BlahBlahBlah", consumer_secret="BlahBlahBlah", access_token_key="BlahBlahBlah", …
Saqib Ali
  • 11,931
  • 41
  • 133
  • 272
2
votes
1 answer

Twitter timeline in Python, but only getting 20ish results?

I'm a nub when it comes to python. I literally just started today and have little understanding of programming. I have managed to make the following code work: from twitter import * config = {} execfile("config.py", config) twitter = Twitter( …
2
votes
2 answers

Twitter Api: How to search in User home timeline

I am using Twitter REST Api for get my Timeline Tweets. Currently I am using following functions to get Tweets and these are working…
Shoaib Ijaz
  • 5,347
  • 12
  • 56
  • 84
2
votes
1 answer

Is there a faster way to do this? (python twitter location)

I'm trying to return a dictionary that aggregates tweets by their nearest state center. I'm iterating over all the tweets, and for each tweet, I'm checking all the states to see which state is the closest. what would be a better way to do this? def…
Jobs
  • 3,317
  • 6
  • 26
  • 52
2
votes
1 answer

Search term intersection and union using Python Tweepy

I would like to get the tweets that either contain 'love' and/or '#hate' using Python Tweepy. But using my current code as below, it only returns the first term (i.e. 'love'). I have been trying for days to debug and read the Tweepy/Twitter…
KubiK888
  • 4,377
  • 14
  • 61
  • 115
2
votes
3 answers

Twitter HTTP Error while sending a request to Twitter API V1.1 (Exploring trending topics)

I was was trying to send a request for retrieving a list of the top 10 trending topics by using the GET trends/places API provided by Twitter at https://dev.twitter.com/docs/api/1.1/get/trends/place. Here's the code for the same in Python: import…
Manas Chaturvedi
  • 5,210
  • 18
  • 52
  • 104
2
votes
4 answers

Programmatic retweeting with Python's twitter library

I'm trying to programmatically retweet various tweets with Python's python-twitter library. The code executes without error, but the RT never happens. Here's the code: from twitter import Twitter, OAuth # my actual keys are here OAUTH_TOKEN =…
Randy Olson
  • 3,131
  • 2
  • 26
  • 39
2
votes
2 answers

How can I find follow requested users with python-twitter

I am trying to follow some user in a list with python-twitter library. But I am taking "You've already requested to follow username" error for some users. That means I have sent a following request to that user so I cant do that again. So how can I…
Yavuz
  • 1,257
  • 1
  • 16
  • 32
2
votes
2 answers

HTTPLIB2 Error installing python-twitter on mac osx

Hello I am trying to install python-twitter and one of the dependencies HTTPLIB2 is giving me a lot of problems. I have searched the internet up and down but maybe I do not know what the right key words are. Here is the problem. I am installing…
Haleh H.
  • 21
  • 1
2
votes
1 answer

Does tweets from search api overlap?

I'm very new to twitter api, and was wondering if I use search api, and I want to call it every minute, to retrieve about a 1000 tweets. Will I get duplicate tweets if in case there were created less than a 1000 tweets for a given criteria or I will…
Vor
  • 33,215
  • 43
  • 135
  • 193
2
votes
3 answers

Get usernames for a retweet?

How can I view the usernames for each retweet from my timeline using Python-Twitter? Here is what I have so far which brings back the timeline without the re-tweet usernames: import twitter api = twitter.Api(xxxxxx) statuses =…
AAA
  • 2,388
  • 9
  • 32
  • 47
2
votes
2 answers

Using python-twitter library, how to set timezone?

I'm trying to list out tweets with their time-stamps. I have this... #!/usr/bin/python import twitter api = twitter.Api() statuses = api.GetUserTimeline('ttytter') for s in statuses: print s.created_at + " " + s.text Which prints out... Sat Oct…
2
votes
2 answers

Crawl twitter data according to specific date

I am new to twitter Api so I don't know its use in broader sense , actually I am crawling tweets on Ghaza for my analyses and I crawl it but just as a sample from page this is what i did while(page<=3): …
user1626276
1
2
3
10 11