317
questions
15
votes
5
answers
25k
views
Using Twython to send a tweet, twitter api error
I'm trying to make python send a tweet for me using Twython but for some reason everything I'm trying isn't working.
I've followed the Twython README but still unable to acheive what I want.
Below ...
9
votes
4
answers
2k
views
Not able to get Country of a Tweet - Twython API
I am using the following code to collect Tweets pertaining to a certain topic but in all the tweets that I have extracted the 'places' attribute is None. Am I doing something wrong? Also, the code is ...
9
votes
2
answers
3k
views
Twitter Rest API: 404 No user matches for specified terms
Twitter allows up to 100 user ids at a time to query for user profile information. But if there is an invalid ID among those, it returns:
404 (Not Found), No user matches for specified terms
without ...
8
votes
0
answers
9k
views
Twitter API - Retrieve all replies to a certain tweet
I am trying to use Twitter API with the Python wrapper Twython and I want to retrieve all replies (the comments below a tweet) to a certain tweet find using some patterns.
At the moment to achieve ...
7
votes
3
answers
8k
views
How to get twitter followers using Twython?
I want to get a list of twitter followers/following of a particular user, when their screenname or user.id is specified. Can anyone please give the code snippet for it? Thanks.
7
votes
1
answer
3k
views
Scrape User Location from Twitter
I am trying to scrape latitude and longitude of user from Twitter with respect to user names. The user name list is a csv file with more than 50 names in one input file. The below are two trials that ...
6
votes
1
answer
24k
views
Fetching tweets with hashtag from Twitter using Python [closed]
How do we find or fetch tweets on the basis of hash tag. i.e. I want to find tweets regarding on a certain subject? Is it possible in Python using Twython?
Thanks
6
votes
1
answer
4k
views
Get count of reply to a particular tweets
I am using the Python tweepy library.
I was successfully able to extract the 'liked' and 're-tweet' counts of a tweet using the below code:
# Get count of handles who are following you
def ...
5
votes
1
answer
9k
views
Twitter API: How to exclude retweets when searching tweets using Twython
I'm trying to exclude retweets and replies in my Twython search.
Here is my code:
from twython import Twython, TwythonError
app_key = "xxxx"
app_secret = "xxxx"
oauth_token = "xxxx"
...
5
votes
2
answers
4k
views
How to post image to twitter with Twython?
I had this small script working perfectly for the last month
from twython import Twython
import glob
import random
app_key = "XXX"
app_secret = "XXX"
oauth_token = "XXX"
oauth_token_secret = "XXX"
...
5
votes
2
answers
3k
views
Getting mentions and DMs through twitter stream API 1.1? (Using twython)
I'm using twython (twitter API library for python) to connect to the streaming API, but I seem to only get the public twitter stream possibly filtered by words. Isn't there a way to get a real-time ...
5
votes
1
answer
749
views
Issue with fetching tweets from timeline as Twitter doesnt return 'next_results'
I am trying to fetch tweets from Twitter timeline using the max_id field present in next_results as demonstrated here.(Twython search API with next_results)
For most of the queries I get the desired ...
5
votes
3
answers
5k
views
Twitter API returned a 401 (Unauthorized), Invalid or expired token
I am using the below code to post a Tweet. This is a pretty standard authentication procedure but for some reason I cannot authenticate. The error I am getting is Twitter API returned a 401 (...
5
votes
4
answers
8k
views
How do I return more than 100 Twitter search results with Twython?
Twitter only returns 100 tweets per "page" when returning search results on the API. They provide the max_id and since_id in the returned search_metadata that can be used as parameters to get earlier/...
4
votes
1
answer
3k
views
python-oauth2 with Twitter's oauth_callback
I'm using Twython as my Twitter API wrapper, and oauth2 to handle authentication. I'm trying to have a use login via twitter, and then redirecting him after the oauth dance to a dynamically generated ...