API - Upcoming changes to simplify replies - auto_populate_reply_metadata

api
extended-tweet

#1

Hey there,

After the update I will be able to use auto_populate_reply_metadata: true in my POSTs to statuses/update to ensure the tweet i’m replying to keeps existing.

The documentation says “In cases where the original status has been deleted, the reply will fail. This is a change to existing behaviour.” (https://dev.twitter.com/overview/api/upcoming-changes-to-tweets)

There’s some info about the error code for that case? or something similar?

Thanks!


#2

Thanks for the question. I guess I have two comments here:

That’s not quite what this does - it does not “ensure” that the Tweet exists (quite the opposite in fact) - this new parameter will cause the @mentions / @replies to be moved into the metadata and allow the whole of the text field for the new Tweet to be used for new content. Just wanted to clarify that to avoid confusion.

Good question about the error code! I’ve actually just looked into this, and in this instance you’d see:

"errors": [
    {
      "code": 385,
      "message": "You attempted to reply to a tweet that is deleted or not visible to you."
    }
  ]

I’ll make sure we update the documentation appropriately as this rolls out in the future. Thanks!


#3

@andypiper Thank you for your quick response!

I think I need to keep improving my english :stuck_out_tongue:


#4

Ah, no, sorry it’s my fault for any misunderstanding here - I just wanted to be sure I didn’t set any incorrect expectation.


#5

One more quick question about auto_populate_reply_metadata

Preconditions:

  • a tweet generated by @user1
  • here’s the tweet’s text => “@user2 look these cool pic!”
  • tweet’s id is 1
  • this tweet is not a reply
  1. auto_populate_reply_metadata => TRUE

If a reply is sent

  • with text “hello!”
  • with auto_populate_reply_metadata=true
  • with in_reply_to_status_id: 1

Will the full_text be “@user1 @user2 hello!”?
Both users will be notified?

2 auto_populate_reply_metadata => FALSE

If a reply is sent

  • with text “@user1 hello!”
  • with auto_populate_reply_metadata=false
  • with in_reply_to_status_id: 1

Will the full_text be “@user1 hello!”?
That means that only @user1 will be notified

Thanks again!


#6

All of this is based on my understanding of the new behaviours - and although I wrote the documentation that you have seen, I may not be 100% correct :see_no_evil:

In the case of 1, “if a reply is sent” implies in_reply_to_status must also be set. In which case yes, full text would contain all of the replies, text would not (replies would be metadata), both users should be notified.

In the case of 2, you’re falling back to existing behaviour, so yes, both of your statements would be correct.