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
0
votes
1 answer

Twitter timeline pulling confusion with python. How to pull 1000s and not just first 200

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( …
0
votes
1 answer

Converting a weird data type to Str

I apologize in advance as I am not sure how to ask this! Okay so I am attempting to use a twitter API within Python. Here is the snippet of code giving me issues: trends = twitter.Api.GetTrendsCurrent(api) print str(trends) This…
Charlie
  • 3
  • 1
0
votes
2 answers

Trying to access the Twitter API returns AttributeError: 'module' object has no attribute 'oauth'

Why does the following error occur when I attempt to access the Twitter API? AttributeError Traceback (most recent call last) in () 17 18 ---> 19 auth =…
0
votes
2 answers

Passing the twitter search json response to a flask route that outputs json

I am using the python library python-twitter to access the twitter api. I am doing a search query and want that response to go my flask route. I get this erro TypeError: is not JSON serializable Here…
nadermx
  • 2,596
  • 7
  • 31
  • 66
0
votes
1 answer

Translate python-twitter code to tweepy

I am trying to follow a python networkx tutorial but its using the python-twitter library and that library deals badly with twitter rate limit compared to tweepy. I want to know how i can do the same thing in tweepy; specifically how do i get the…
jxn
  • 7,685
  • 28
  • 90
  • 172
0
votes
1 answer

How to send a Twitter request from Python

So i've been using www.hurl.it to send some twitter app authenticated GET requests. Like this.. https://api.twitter.com/1.1/followers/ids.json?cursor=-1&screen_name=userfoo Then I put in my user keys and tokens and it sends this…
TysonU
  • 432
  • 4
  • 18
0
votes
1 answer

Python-Twitter: Retrieve most recent mentions

I'm trying to use the Python-Twitter library (https://github.com/bear/python-twitter) to extract mentions of a twitter account using the GetMention() function. The script populates a database and runs periodically on a cron job so I don't want to…
AdamDynamic
  • 761
  • 6
  • 15
  • 29
0
votes
1 answer

Get the top followed followers of a user in twitter using python-twitter

I want to get the top followed followers of a user in twitter using python-twitter. And that without getting the 'Rate limit exceeded' error message. I can get followers of a user then get the number of folowers of each one, but the problem is when…
mou55
  • 660
  • 1
  • 8
  • 13
0
votes
2 answers

Getting a user twitter timeline in python

I need to get a users entire twitter timeline in python. I am using the following code with all the oauth keys: import twitter api = twitter.api(consumer_key='', consumer_secret='', access_token_key='',…
user3098440
  • 1
  • 1
  • 1
0
votes
1 answer

python-twitter: get_oauth( ) giving unexpected error

I am new to python and I have been making codes to scrap twitter data on python. Below are my codes: import csv import json import twitter_oauth import sys sys.path.append("/Users/jdschnieder/Documents/Modules") print sys.path #gain authorization…
Jin-Dominique
  • 3,043
  • 6
  • 19
  • 28
0
votes
1 answer

python: attempt to install the python-twitter causing error

I am trying to install the twitter module on my python and for some unknown reason it is keep throwing an error message. I use Macbook and on terminal I typed: pip install python-twitter and then it seems to work for awhile but then error…
Jin-Dominique
  • 3,043
  • 6
  • 19
  • 28
0
votes
1 answer

Troubles authorizing Twitter Streaming API through Python Twitter Tools

I've been working with Python Twitter Tools and haven't had any problems authenticating with the REST API through this library. But when I try to authenticate with the Streaming API, I get nothing but 401 HTTP Unauthorized errors. Similar to the…
ishikun
  • 428
  • 5
  • 21
0
votes
2 answers

Overriding a method of a class and access its variables

I am trying to override the method called GetFollowerIDs of this class: https://github.com/bear/python-twitter/blob/master/twitter.py#L3705 What I want to achieve is executing the function normally then get next_cursor not just result. I tried the…
Adam
  • 2,948
  • 10
  • 43
  • 74
0
votes
1 answer

How to set User-Agent in python-twitter?

i'm writing a small script to tweet messages from the monitoring systems. The only issue i ran into so far is that i can't set the User-Agent correctly, all tweets show up as "from API" which ain't a huge deal but i wonder what I'm doing wrong. An…
Birt
  • 437
  • 1
  • 6
  • 11
0
votes
1 answer

GetFollowerIDs function is not working anymore

api = twitter.Api(consumer_key='aaa',consumer_secret='aaa', access_token_key='aaa', access_token_secret='aaa') followers=api.GetFollowerIDs() That code was working 4 days ago. But suddenly stop to work. It gives error below. I am using…
Yavuz
  • 1,257
  • 1
  • 16
  • 32