Animated GIF tweet misses extended_entities attribute


#1

https://twitter.com/LarryMcTweet/status/482251902760288257 has an animated GIF uploaded.

But GET statuses/show/:id with id=482251902760288257 is missing the extended_entities property as well as any link to the MP4 file.


#2

Any update on this?


#3

I think @andypiper may have some information on this.


#4

Hey everyone. We’re working on enabling this in the tweet object JSON over the coming weeks, and are about to start testing with a small number of third parties to ensure that the transition is as smooth as possible. Please bear with us a little longer while we get that worked through.


#5

Half a year later, the extended_entities are still not present in the Tweet object. See here:

{
  "created_at": "Sun Apr 26 13:45:10 +0000 2015",
  "id": 592323538163527680,
  "id_str": "592323538163527680",
  "text": "Have you seen the small animation over there? Curious to check out its code. http:\/\/t.co\/h70mgxoK6c",
  "source": "\u003ca href=\"http:\/\/twitter.com\" rel=\"nofollow\"\u003eTwitter Web Client\u003c\/a\u003e",
  "truncated": false,
  "in_reply_to_status_id": null,
  "in_reply_to_status_id_str": null,
  "in_reply_to_user_id": null,
  "in_reply_to_user_id_str": null,
  "in_reply_to_screen_name": null,
  "user": { /* ... */ },
  "geo": null,
  "coordinates": null,
  "contributors": null,
  "retweet_count": 0,
  "favorite_count": 0,
  "entities": {
    "hashtags": [],
    "symbols": [],
    "user_mentions": [],
    "urls": [{
      "url": "http:\/\/t.co\/h70mgxoK6c",
      "expanded_url": "http:\/\/twitter.com\/jublonet\/status\/592323538163527680\/photo\/1",
      "display_url": "pic.twitter.com\/h70mgxoK6c",
      "indices": [77, 99]
    }]
  },
  "favorited": false,
  "retweeted": false,
  "possibly_sensitive": false,
  "possibly_sensitive_appealable": false,
  "lang": "en"
}

#6

We enabled animated GIF and video entities in the REST and Streaming APIs several months ago.

How did you retrieve this Tweet object?

I just used twurl to do so, and all of the extended entities are present:

$ twurl "/1.1/statuses/show.json?id=592323538163527680" | jsonator

{
  "created_at": "Sun Apr 26 13:45:10 +0000 2015",
  "id": 592323538163527680,
  "id_str": "592323538163527680",
  "text": "Have you seen the small animation over there? Curious to check out its code. http://t.co/h70mgxoK6c",
  "source": "<a href=\"http://twitter.com\" rel=\"nofollow\">Twitter Web Client</a>",
  "truncated": false,
  "in_reply_to_status_id": null,
  "in_reply_to_status_id_str": null,
  "in_reply_to_user_id": null,
  "in_reply_to_user_id_str": null,
  "in_reply_to_screen_name": null,
  "user": {
    "id": 14648265,
    "id_str": "14648265",
    "name": "Jublo Solutions",
    "screen_name": "jublonet",
    "location": "Leeds, West Yorkshire",
    "description": "Microsoft experts. Coders. Web & app developers. Connecting you to your network.",
    "url": "http://t.co/25U0Cubsd2",
    "entities": {
      "url": {
        "urls": [
          {
            "url": "http://t.co/25U0Cubsd2",
            "expanded_url": "http://www.jublo.net/",
            "display_url": "jublo.net",
            "indices": [
              0,
              22
            ]
          }
        ]
      },
      "description": {
        "urls": [

        ]
      }
    },
    "protected": false,
    "followers_count": 3208,
    "friends_count": 163,
    "listed_count": 76,
    "created_at": "Sun May 04 14:09:54 +0000 2008",
    "favourites_count": 376,
    "utc_offset": 3600,
    "time_zone": "London",
    "geo_enabled": true,
    "verified": false,
    "statuses_count": 9501,
    "lang": "en",
    "contributors_enabled": false,
    "is_translator": false,
    "is_translation_enabled": false,
    "profile_background_color": "EEEEEE",
    "profile_background_image_url": "http://pbs.twimg.com/profile_background_images/462275421027848192/3lvBXzZy.jpeg",
    "profile_background_image_url_https": "https://pbs.twimg.com/profile_background_images/462275421027848192/3lvBXzZy.jpeg",
    "profile_background_tile": false,
    "profile_image_url": "http://pbs.twimg.com/profile_images/462269248945922048/qjwRrJcp_normal.png",
    "profile_image_url_https": "https://pbs.twimg.com/profile_images/462269248945922048/qjwRrJcp_normal.png",
    "profile_banner_url": "https://pbs.twimg.com/profile_banners/14648265/1429902296",
    "profile_link_color": "E10202",
    "profile_sidebar_border_color": "FFFFFF",
    "profile_sidebar_fill_color": "C2DAC9",
    "profile_text_color": "8AB2A3",
    "profile_use_background_image": false,
    "default_profile": false,
    "default_profile_image": false,
    "following": false,
    "follow_request_sent": false,
    "notifications": false
  },
  "geo": null,
  "coordinates": null,
  "place": {
    "id": "6863fd050de21120",
    "url": "https://api.twitter.com/1.1/geo/id/6863fd050de21120.json",
    "place_type": "city",
    "name": "Leeds",
    "full_name": "Leeds, England",
    "country_code": "GB",
    "country": "United Kingdom",
    "contained_within": [

    ],
    "bounding_box": {
      "type": "Polygon",
      "coordinates": [
        [
          [
            -1.706057,
            53.7363694
          ],
          [
            -1.424923,
            53.7363694
          ],
          [
            -1.424923,
            53.867543
          ],
          [
            -1.706057,
            53.867543
          ]
        ]
      ]
    },
    "attributes": {
    }
  },
  "contributors": null,
  "retweet_count": 0,
  "favorite_count": 0,
  "entities": {
    "hashtags": [

    ],
    "symbols": [

    ],
    "user_mentions": [

    ],
    "urls": [

    ],
    "media": [
      {
        "id": 592323537290952704,
        "id_str": "592323537290952704",
        "indices": [
          77,
          99
        ],
        "media_url": "http://pbs.twimg.com/tweet_video_thumb/CDhbHnBUgAAGEpE.png",
        "media_url_https": "https://pbs.twimg.com/tweet_video_thumb/CDhbHnBUgAAGEpE.png",
        "url": "http://t.co/h70mgxoK6c",
        "display_url": "pic.twitter.com/h70mgxoK6c",
        "expanded_url": "http://twitter.com/jublonet/status/592323538163527680/photo/1",
        "type": "photo",
        "sizes": {
          "medium": {
            "w": 493,
            "h": 270,
            "resize": "fit"
          },
          "small": {
            "w": 340,
            "h": 185,
            "resize": "fit"
          },
          "thumb": {
            "w": 150,
            "h": 150,
            "resize": "crop"
          },
          "large": {
            "w": 493,
            "h": 270,
            "resize": "fit"
          }
        }
      }
    ]
  },
  "extended_entities": {
    "media": [
      {
        "id": 592323537290952704,
        "id_str": "592323537290952704",
        "indices": [
          77,
          99
        ],
        "media_url": "http://pbs.twimg.com/tweet_video_thumb/CDhbHnBUgAAGEpE.png",
        "media_url_https": "https://pbs.twimg.com/tweet_video_thumb/CDhbHnBUgAAGEpE.png",
        "url": "http://t.co/h70mgxoK6c",
        "display_url": "pic.twitter.com/h70mgxoK6c",
        "expanded_url": "http://twitter.com/jublonet/status/592323538163527680/photo/1",
        "type": "animated_gif",
        "sizes": {
          "medium": {
            "w": 493,
            "h": 270,
            "resize": "fit"
          },
          "small": {
            "w": 340,
            "h": 185,
            "resize": "fit"
          },
          "thumb": {
            "w": 150,
            "h": 150,
            "resize": "crop"
          },
          "large": {
            "w": 493,
            "h": 270,
            "resize": "fit"
          }
        },
        "video_info": {
          "aspect_ratio": [
            247,
            135
          ],
          "variants": [
            {
              "bitrate": 0,
              "content_type": "video/mp4",
              "url": "https://pbs.twimg.com/tweet_video/CDhbHnBUgAAGEpE.mp4"
            }
          ]
        }
      }
    ]
  },
  "favorited": false,
  "retweeted": false,
  "possibly_sensitive": false,
  "possibly_sensitive_appealable": false,
  "lang": "en"
}

#7

Hmmm, strange. I used our own Twitter library, Codebird, in PHP flavor. Are there any special parameters that I’d need to append to the call in order to get back the extended_entities object?

Can you take a look, please?


#8

I can’t see anything in your code that suggests that you shouldn’t be receiving the full Tweet object. You’re not appending any parameters like &include_entities=false so the full object should be available. Odd!


#9

@jublonet, did you find the issue?

Im having the same problem and cant see why im not getting any extended_entities attribute


#10

Is this related to a specific Tweet? Which endpoint are you calling to retrieve the details?


#11

Im searching by hashTag, m using this link:
https://api.twitter.com/1.1/search/tweets.json?q=%23%23nuatzTag&count=20&since_id=&result_type=recent&include_entities=1&lang=


#12

OK I see what is happening here:

twurl "/1.1/search/tweets.json?q=%23nuatzTag&count=20&result_type=recent&include_entities=1" returns both of the Tweets you posted yesterday.

The second one contains an animated GIF. However, because you’re hitting the search end point, the extended entities don’t show up.

If you then retrieve the second Tweet directly, the extended entities are visible.
twurl "/1.1/statuses/lookup.json?id=633417503981498369"

Unfortunately video entities are not returned by the search endpoints, you have to retrieve the Tweets manually to get them. Things are working correctly here.


#13

yes,but will the search api include extra endpoints eventually?

or, how could I notice that the 2nd tweet has a gif?


#14

I don’t know of any plans to enrich the search API results at the moment.


#15

I got a similar issue or question;
I could upload a 5MB+ animated .GIF at twitter.com webinterface.
Then wanted to API request (/lookup & /show) the GIF’s URI (as .gif), but only found .PNG previews and a .MP4 video file as entities.
Is there a chance to get the original .GIF (from the original uploaded .GIF file) as URI?


#16

No. GIFs are transcoded to MP4 on upload.