Changes to withheld content fields

Wednesday, 24 October 2012


  • This change was deployed on Nov. 2, 2012 with additional fields announced here: More changes to withheld content fields.
  • The original post was modified to reflect that one account’s Tweets are affected, not one Tweet.

This is a notice that the withheld_in_countries field will be changing its JSON representation from what was originally announced. This field was documented as a comma-separated JSON string. We will update our REST and streaming Tweet objects to use an array of uppercase strings, as we believe this is more developer friendly. Only Tweets from one account (as of this date) are affected, so while this is a breaking change, it is not a widely disruptive one.

To illustrate this change, the following example from the announcement:

"text": "@chatty's account is withheld in: Greece, Hong Kong, Malaysia,.",
"withheld_scope": "user",
"withheld_in_countries": "GR, HK, MY",

Will now look like this:

"text": "@chatty's account is withheld in: Greece, Hong Kong, Malaysia,.",
"withheld_scope": "user",
"withheld_in_countries": ["GR", "HK", "MY"],

This change unifies the REST API response with the status_withheld streaming event message, which will now look like:

    "withheld_in_countries":["DE", "AR"]

Note that we will be delivering the country codes as uppercase in all locations now: REST Tweet responses, streamed Tweet objects, and streamed status_withheld events. Therefore, this change affects REST API versions 1 and 1.1, as well as Streaming API versions 1 and 1.1. Keep in mind that this is only a change to the JSON representation. The (deprecated) XML representation of this field will not change.

We expect this change to ship next week. This post will be updated to reflect the current status.

Please use this discussion thread to ask questions or leave feedback about this change.