I want to use twitter api for poll votes using tweepy is there any methods to implement this?
I tried doing api.update_status("poll_1"[1112227775552223333])
but its not working.
I want to use twitter api for poll votes using tweepy is there any methods to implement this?
I tried doing api.update_status("poll_1"[1112227775552223333])
but its not working.
2
Answers
No. The poll API is private and is not available to anyone apart from Twitter’s own apps.
There are no plans to open this to the public – https://twittercommunity.com/t/poll-support/78235
The other answer is incorrect. There is a way, it’s just the JSON data you get back is quite unwieldy (I have plans to build a
tweepy
addon to make this easier). The way to get it with Python 3.x is throughrequests
. Don’t worry though, it’s only a line or so of code. As you can see in this link, we can indeed get back twitter poll data. Here’s a code snippet:Beware though, the Twitter polls API isn’t lightning fast, so there might be several seconds of a delay between a poll getting voted on and the request JSON changing.