Media Entity


#1

Any reason the media entity is missing from json objects?

https://api.twitter.com/1/statuses/user_timeline.json?include_entities=1&include_rts=true&screen_name=stephenfry&count=50&callback=?

The include_entities is equal to true (or 1) and it doesn’t return the object with the data in. My application relies heavily on knowing if the tweet is about an image or video, and I’m wondering if this will be rectified soon.

Many thanks,

-Miles

@dpfeed


#2

At this time, if a user copy and pastes a Twitter media URL from another Tweet, the media entities in the new tweet will not expand the same way as they would if it were the original author tweeting the image. Other than that, if for any reason the service that determines these things is unavailable, it’s default failover behavior is to simply omit the entities.


#3

@episod

Struggling to pull any through at all. I can understand there being a few bugs and the failover behaviour, but unable to pull any at all? Am I doing something wrong? I don’t want to have to write something that pulls the links apart to try and find media content if I can help it.

Do you have a jsonp call which you know works?

Thanks,

-Miles


#4

@stephenfry in this example doesn’t have any pic.twitter.com uploads until a bit into his user_timeline (we don’t provide “media” entities for anything but pic.twitter.com uploads – you’ll need to use entities/urls to “discover” other kinds of links).

curl "https://api.twitter.com/1/statuses/user_timeline.json?screen_name=stephenfry&max_id=178373907244523521&count=1&include_entities=true" [ { "coordinates": null, "favorited": false, "truncated": false, "created_at": "Sat Mar 10 06:57:08 +0000 2012", "id_str": "178373907244523521", "in_reply_to_user_id_str": null, "entities": { "urls": [
  ],
  "media": [
    {
      "sizes": {
        "large": {
          "w": 612,
          "resize": "fit",
          "h": 816
        },
        "medium": {
          "w": 600,
          "resize": "fit",
          "h": 800
        },
        "small": {
          "w": 340,
          "resize": "fit",
          "h": 453
        },
        "thumb": {
          "w": 150,
          "resize": "crop",
          "h": 150
        }
      },
      "media_url_https": "https://p.twimg.com/Anm2H6LCIAAV3bD.jpg",
      "expanded_url": "http://twitter.com/stephenfry/status/178373907244523521/photo/1",
      "id_str": "178373907248717824",
      "url": "http://t.co/1v9MwxCm",
      "id": 178373907248717824,
      "type": "photo",
      "indices": [
        22,
        42
      ],
      "display_url": "pic.twitter.com/1v9MwxCm",
      "media_url": "http://p.twimg.com/Anm2H6LCIAAV3bD.jpg"
    }
  ],
  "hashtags": [

  ],
  "user_mentions": [

  ]
},
"text": "They do sunsets here. http://t.co/1v9MwxCm",
"contributors": null,
"id": 178373907244523521,
"retweet_count": 220,
"in_reply_to_status_id_str": null,
"geo": null,
"retweeted": false,
"possibly_sensitive": false,
"in_reply_to_user_id": null,
"source": "<a href=\"http://www.apple.com\" rel=\"nofollow\">Photos on iOS</a>",
"place": null,
"user": {
  "profile_sidebar_fill_color": "48ccf4",
  "profile_background_tile": false,
  "name": "Stephen Fry",
  "profile_sidebar_border_color": "19a7d6",
  "created_at": "Tue Jul 15 11:45:30 +0000 2008",
  "profile_image_url": "http://a0.twimg.com/profile_images/1670431654/8fc1c028-0c48-4174-a762-a8ed53485356_normal.png",
  "location": "Wellington, New Zealand",
  "profile_link_color": "1c83a6",
  "follow_request_sent": false,
  "is_translator": false,
  "id_str": "15439395",
  "url": "http://www.stephenfry.com/",
  "default_profile": false,
  "favourites_count": 51,
  "contributors_enabled": false,
  "utc_offset": 0,
  "profile_image_url_https": "https://si0.twimg.com/profile_images/1670431654/8fc1c028-0c48-4174-a762-a8ed53485356_normal.png",
  "id": 15439395,
  "listed_count": 49742,
  "profile_use_background_image": true,
  "followers_count": 4008233,
  "protected": false,
  "profile_text_color": "333333",
  "lang": "en",
  "profile_background_color": "a5e6fa",
  "verified": true,
  "notifications": false,
  "description": "British Actor, Writer, Lord of Dance, Prince of Swimwear & Blogger",
  "profile_background_image_url_https": "https://si0.twimg.com/profile_background_images/344496995/twitter_oct2011.jpg",
  "time_zone": "London",
  "geo_enabled": true,
  "friends_count": 52199,
  "profile_background_image_url": "http://a0.twimg.com/profile_background_images/344496995/twitter_oct2011.jpg",
  "statuses_count": 11064,
  "default_profile_image": false,
  "screen_name": "stephenfry",
  "following": true,
  "show_all_inline_media": true
},
"in_reply_to_screen_name": null,
"in_reply_to_status_id": null

}
]


#5

#6

#7