Poll support for rest api


#1

Any plans for the just announced polls to be supported in the Api?


Endpoint or entity for Twitter Polls
#2

No news to share on this today. Stay tuned for changes.


#3

It would be great if the tweet at least indicated that it contains a poll, as absolute minimum of support.

Of course, proper support would include much more, but it’s a stop-gap measure to at least avoid confusion and allowing linking to a version of Twitter that supports polls natively.


#4

i absolutely support this point.
at least we could start support this the “poll case” in timeline parsing


#5

I’m actually quite disappointed there wasn’t at least a poll field included in the api on release of polls.


#6

It’s great to hear that there is interest in API access for polls. I can say that the interest is being relayed to the polls product team. Polls are an evolving product and we would not want developers building apps around a feature that is a moving target. This was briefly addressed in the update to Jack’s #HelloWorld prompt. I’ve included the excerpt below.

We want to ensure that the APIs we do publish reflect consumer adoption of features and products. For example, at Flight we announced Polls on Twitter. We want to ensure broad consumer acceptance of this feature before committing to shipping a public-facing API. You can expect this measured approach going forward.

You can read the full blog post here.

To developers coming across this post, I encourage you to keep expressing your interest. I would also encourage you to share what you would build around it and what you would except the API to look like if polls were exposed.


Get results to all my polls
#7

At the very least, another boolean field in the tweet object saying whether it’s a poll or not. Maybe, if it’s not asking too much, also another object with the question and a list of possible answers. But I’m happy with just the boolean.

Would have been better if it was a tweet entity over a t.co link that pointed to the tweet itself (sorta like images). That would mean existing clients can at least see a slightly different post without needing code changes. But polls don’t add a t.co link and tweet entities need it.

I just want to be able to direct confused users to the poll in the twitter website instead of showing a plain text tweet.


#8

My initial wants (like right now) would be

  • bool to say the tweet includes a poll
  • the text of the options

From there people could decide if they want to vote and I could provide a link to the tweet.

My next requests would be

  • bool for poll open/closed
  • number of votes / percentages

The finally

  • who voted
  • has the user making the call voted
  • call to vote for an option

#9

I am really looking forward to use this feature :slight_smile:


#10

Photo/video support introduced pic.twitter.com for existing clients. Why no same approach now?


#11

Yes we are definitely interested in have polls in the Rest or Stream APIs, so that we can better engage and inform users in contexts like this event dashboard https://websummit.net/live-on-social-media or others events we’re covering


#12

@joncipriano Thank you for the quote from Jack.

I appreciate that this is a “beta” feature and your desire to let the feature “bake” before exposing an API change. I think everyone here can understand the desire to prevent other APIs from writing these or from reading the stats.

However, your change is effectively breaking “readers” of Tweets because you’re not actually telling us in any programmatic way that the Tweet we’re looking at is a poll.

I understand that you don’t want other APIs to display polls or write to polls or read to polls. I’m happy to write an “if” statement to make that happen. But how can I do this if I don’t know that a given Tweet is a poll?

@artesea has a great future wish list, but I’m struggling to understand why we don’t at least have the boolean indicating that a Tweet is a poll?


#13

Understand the frustration here - I can’t share anything about any immediate plan to change the representation, but bear with us and we will see what we can do.


#14

Having worked with a wide variety of formats for broadcast or online, we would definitely love seeing Twitter Polls appear in one of the APIs. Although I’m a fan of the Streaming API, I guess the REST API is the most logical one to start with.

This would be my wish list:

  • Create Poll by PUTting: Question, 1…N alternatives (each with a possible image attached to it perhaps?), start date, end date, max number of votes per user
  • Read Poll by GETting: same parameters as PUT, plus Poll state, number of votes per alternative
    Obviously these parameters should be in separate fields, not encapsulated in the text.
  • Perhaps Operate Poll by PUTting: reference to existing Poll and new parameters, e.g., to Pause a Poll temporarily or to End it before its scheduled end date, or to add an alternative, …

#15

If API access is not available at this time, can we at least have a way of exporting poll data? (CSV, json, etc etc).


#16

I am also interested in having the polls questions and answers in Twitter Stream APIs. Although it will be like retweet and favorite numbers almost always zero because they are just streamed, it would be very helpful to know the question and the options for answers.

Polls on Twitter will allow users to just tweet for the sake of polling purposes. Therefore, if the stream contains these tweets without the poll details it will reduce the productivity of those tweets and harder to analyze.

Great idea and thanks for being open to having it in your APIs.


#17

Great point! I agree. A simple boolean to define if tweet is a poll or not should be simple enough.


#18

please add polls feature to API reponse. it hurts me everyday =(


#19

I was surprised with complete absence of polls info in API response. Add it, please.


#20

+1 really hoping for API support for this!