Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

changes to character counting #338

Closed
jeremylow opened this issue May 24, 2016 · 11 comments
Closed

changes to character counting #338

jeremylow opened this issue May 24, 2016 · 11 comments
Milestone

Comments

@jeremylow
Copy link
Collaborator

Leaving this here so we can track as it rolls out

https://blog.twitter.com/express-even-more-in-140-characters

@jeremylow
Copy link
Collaborator Author

@bear
Copy link
Owner

bear commented May 24, 2016

Just woke up, saw this and popped over to make a tracking issue... thanks @jeremylow !

@jeremylow
Copy link
Collaborator Author

Yep! Here's the more technical descriptions

https://dev.twitter.com/overview/api/upcoming-changes-to-tweets

@pseudomonas
Copy link

This change seems now to be live; tweets are truncated by default. Would like to be able to switch on the tweet_mode=extended parameter in the rest API as described in @jeremylow's link https://dev.twitter.com/overview/api/upcoming-changes-to-tweets

@bear
Copy link
Owner

bear commented Oct 1, 2016

@jeremylow do we have something in the queue for this?

@jeremylow
Copy link
Collaborator Author

I'm working on it this weekend. A lot of tests are failing because of
the added parameters, so I'm working through those now.

On 10/01/2016 06:21 PM, Mike Taylor wrote:

@jeremylow https://github.com/jeremylow do we have something in the
queue for this?


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#338 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AEucDdNuorO_4UFlL5bBMHtbYsiExABcks5qvt0EgaJpZM4IliHG.

@jeremylow
Copy link
Collaborator Author

jeremylow commented Oct 3, 2016

Just pushed a partial implementation if anyone wants to give it a shot.

  • exclude_reply_user_ids
  • auto_populate_reply_metadata
  • attachment_url
  • error handling
  • tweet_mode
  • update Status model

So basically, the consumption of tweets should work as expected, but there's some missing implementation on the posting & error handling.

@jeremylow
Copy link
Collaborator Author

Error handling seems to work with our current implementation, so I'm going to leave as is and not worry about the new status codes - those should be easy enough to handle on the user side.

Here's a question:

So there's this attachment_url parameter, which basically acts like this: if the user specifies the attachment_url (which shall be "a single URL entity that identifies an attachment resource: currently, one to four photos, a GIF, video, poll, Quote Tweet, or DM deep link") then that doesn't count against the 140 characters, but if you just use the normal post media, attach media pipeline, then this is going to count against your 140 characters (I think - this is how it's described in the docs). This is our current pipeline and, anecdotally, this is how it seems to work in tweetdeck.

Unfortunately, we can't currently generate one url for four images; I assume Twitter can, but like polls, this isn't available via the REST API. Therefore, if a user were to come along, upload four images, attach all of them via the media param, that user would (rightly) think that those will not count against the 140 characters, but since we can't generate a single URL for those four images, I think the reality is going to be different from the expectation. Not really sure how to square that circle.

@bear
Copy link
Owner

bear commented Oct 4, 2016

I've seen other libraries pick one of the four to use as the url that isn't counted and then add the rest to the mix, for ours maybe let's go with "pick the first one in the list" and see how that plays out

@jeremylow jeremylow added this to the 3.2 milestone Oct 5, 2016
@jeremylow
Copy link
Collaborator Author

@bear Do you have a reference for that? I can't figure out a way to get a url from a media id, which is the only thing I'm getting back from twitter after uploading an image.

@bear
Copy link
Owner

bear commented Oct 11, 2016

@jeremylow nothing I can point you to - they were all conversations with some other twitter api consumer friends who had to deal with this. Twitter has changed a lot of little things I feel to force people to use their cards for anything media related

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants