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
1
vote
0 answers

Python-Twitter API's function, GetSearch, returns fewer results for a wider radius

When I use GetSearch with the GeoCode, searching in a 1 mile radius returns the most results. This: results = api.GetSearch(term = "treat", geocode = ("37.781157", "-122.398720", "1mi"), max_id = 1061378028763316224, count = 20) returns 18 tweets,…
Alex Lee
  • 11
  • 3
1
vote
1 answer

Twitter API search returns truncated tweets

I'm trying to build a python program to get tweets based around a certain keyword. However, while I can successfully retrieve tweets, they come back truncated. How can I get the full text of a tweet? CODE: (Sample output below code) (python-twitter…
1
vote
0 answers

sorry page not found message while using valid WOEID for Twitter API

I am trying to generate the trending topics for WOEID 23424911 (Nepal). It generates the following message TwitterError: [{u'message': u'Sorry, that page does not exist.', u'code': 34}] code used: import…
lpt
  • 931
  • 16
  • 35
1
vote
2 answers

How can I get tweets older than a week?

I am trying to collect tweets about natural disasters just for my academic purposes. But it seems I am not able to get the tweets older than a week. I have tried tweepy, python-twitter, twython. Is there anyway that I can collect more tweets? My…
vjnan369
  • 833
  • 16
  • 42
1
vote
1 answer

How can I retrieve the full text of a tweet?

I run the code below and even I set as parameter tweet_mode='extended' i do not get the full text of the retrieved tweets. Can anybody help me to fix it? import tweepy consumer_key ='xxxx' consumer_secret = 'xxxx' access_token =…
HELMA
  • 19
  • 4
1
vote
2 answers

Python Twitter API TwitterError: user_id must be type int

I'm trying to use python-twitter. I'm following this tutorial. Here is my code: tweet = cache.get('tweet') if not tweet: tweet = twitter.Api().GetUserTimeline(settings.TWITTER_USER)[0] tweet.date = datetime.strptime(tweet.created_at, "%a %b…
singhakash
  • 7,891
  • 6
  • 31
  • 65
1
vote
1 answer

can i get date of friendship in twitter?

is there a way to get the date of friendship creation for both my friends and followers in twitter? especially for python-twitter....
goh
  • 27,631
  • 28
  • 89
  • 151
1
vote
1 answer

Python twitter package : get error code

I'm not yet very familiar with error handling in Python. I'd like to know how to retrieve the error code when I get an error using the python-twitter package : import twitter #[...] try: twitter_connexion.friendships.create(screen_name =…
François M.
  • 4,027
  • 11
  • 30
  • 81
1
vote
1 answer

How to search for gifs in Twitter API?

I'm using python-twitter to build an application that would search for all the tweets including gifs in a given time range for a set of users. For example, I'd like to get all the gifs from user @NHLJets during the interval 2017-03-21 ->…
Hamatti
  • 1,210
  • 10
  • 11
1
vote
4 answers

Tweepy Error - Python -

I install Tweepy and Python-Twitter and try basic code import twitter api = twitter.Api(consumer_key=["X"], consumer_secret=["X"], access_token_key=["35X-X"], …
CezmiChef
  • 53
  • 6
1
vote
1 answer

Using django-syncr with twitter

I wanted to add twitter feed to my application. So I've downloaded python-twitter (with python-oauth) and django-syncr. Installed everything and what now ? In my main view I wanted to perform Twitter synchronisation. So looking into packages source…
DevAno1
  • 393
  • 1
  • 8
  • 19
1
vote
1 answer

How/where should I store data in a Django app that is not connected to any HTTP request?

I have created a Django app with the usual components: applications, models views, templates, etc. The architecture of a Django app is such that it basically just sits there and does nothing until you call one of the views by hitting a REST…
Saqib Ali
  • 11,931
  • 41
  • 133
  • 272
1
vote
1 answer

Larger font sizes when usis POST statuses/update twitter developer api

I am successfully using the python-twitter api python-twitter to update the status of a twitter account. But the font sizes are larger that than the other tweets. Firebug inspection shows that api update has a "TweetTextSize.TweetTextSize--26px" css…
ewianda
  • 61
  • 1
  • 6
1
vote
1 answer

I want to have all the tweets of a userid not the latest 200 from twitter in python

I am using the python-twitter module to get the tweets of my friends. I used the following code: import twitter CONSUMER_KEY = '' CONSUMER_SECRET = '' OAUTH_TOKEN = '' OAUTH_TOKEN_SECRET = '' auth = twitter.oauth.OAuth(OAUTH_TOKEN,…
psr
  • 2,619
  • 4
  • 32
  • 57
1
vote
1 answer

Complex queries with twitter API- python wrapper

Are complex queries possible using the twitter API? For example in the example queries shown in the dev site can I have my query be something like: ("chocolate" AND "cat") OR ("super ninja" AND "ghost" AND "person" but NOT "dog") The queries in…
hope288
  • 725
  • 12
  • 23