Wrong expanded_url value in get status response


#1

Hi,

The response when fetching a twitter status trough the Rest API (/statuses endpoint) does not contain the ow.ly link that appears in the status.

Twitter status: https://twitter.com/les5pieces/status/826438596718649344
Response: http://pastebin.com/wQEkQMsD

The expected value for the entities.urls.expanded_url field would be: http://ow.ly/WFHA308wXbt

Is there any reason why this happens?

Thanks!


#2

That’s an extended Tweet (truncated: true in default mode) so you need to append tweet_mode=extended.

$ twurl "/1.1/statuses/show.json?id=826438596718649344&tweet_mode=extended"

...
    "urls": [
      {
        "url": "https://t.co/kNfiH1Dz7h",
        "expanded_url": "http://ow.ly/WFHA308wXbt",
        "display_url": "ow.ly/WFHA308wXbt",
        "indices": [
          102,
          125
        ]
      }
    ],
...

Expanded URL truncated
#3

Thank you!