The Wayback Machine - https://web-wp.archive.org/web/20140716221532/https://dev.twitter.com/notifications/multiple-media-entities-in-tweets

Multiple Media Entities in Tweets for the REST API

jaakkosf
@jaakkosf jacob petrie

We are planning to launch support for multiple media entities in tweets via our REST API on May 28th. This will be exposed as a new extended_entities object in the JSON response.

Today the only type exposed in our entities is photo, however with the addition of extended_entities we plan to expand the types of media we expose. Developers should actively use the type attribute from the media exposed to validate you are handling the types properly, and ignore types that are not of type photo.

For details on the changes we’ll be making to support this feature, visit Multiple Media Entities in Statuses. We’ll Tweet from @TwitterAPI when we make the actual changes on the 28th.

Post your questions here or Tweet to @TwitterDev.

7 weeks 6 days ago

Replies

nosuz
@nosuz nosuz

Accessing to the Web page "Multiple Media Entities in Statuses" is denied when I signed into this site. I can read the page if I sign out.

7 weeks 14 hours ago
andypiper
@andypiper Andy Piper

hmm, that's odd - I checked the permissions and it should allow you to access the page when logged in. Will check whether there's a caching issue.

7 weeks 4 hours ago
froginthevalley
@froginthevalley Sylvain Carle

This will actually be released tomorrow, May 29th, during business hours (PDT).

We will slowly ramp up availability throughout the day.

6 weeks 6 days ago
ikindow
@ikindow kindow

so it's normal i can't get mulitple photos in a tweet right now?

6 weeks 6 days ago
froginthevalley
@froginthevalley Sylvain Carle

Yes. I will update this thread when we start to ramp this up, we will roll it out gradually during the day.

6 weeks 6 days ago
froginthevalley
@froginthevalley Sylvain Carle

The roll out will be completed by the end of the day tomorrow (Friday May 30th, before 5pm PDT).

6 weeks 5 days ago
froginthevalley
@froginthevalley Sylvain Carle

You should start to see the extended_entities this morning, we are ramping this first. This afternoon we will enable POSTing.

6 weeks 5 days ago
nst021
@nst021 Nicolas Seriot

Posting multiple photos still doesn't work:

  1. $ twurl "/1.1/statuses/update.json" -d "media_ids=460938773744717825,460938635315916800&status=Combined.&trim_user=1"
  2.  
  3. {"errors":[{"message":"Internal error","code":131}]}

And now https://dev.twitter.com/docs/api/multiple-media-extended-entities returns "Access denied".

Is something going wrong?

6 weeks 3 days ago
radekmika
@radekmika Radek Mika

How does it look with the rollout? Unfortunately we are still unable to see extended_entities for tweets in the API. Should we wait or fill in a bug report?

Example request: https://apigee.com//snapshot/twitter?snapId=apigee-console-snapshots-1401598800000_862685cf-519f-488c-9344-72fe4d44acf8.

Thanks.

6 weeks 2 days ago
froginthevalley
@froginthevalley Sylvain Carle

Not sure if this is an issue with the apigee console, just tested it using twurl with the sample tweet in the docs (https://api.twitter.com/1.1/statuses/show.json?id=449660889793581056) and it worked for me.

6 weeks 2 days ago
radekmika
@radekmika Radek Mika

Hi Sylvain,
thanks for you reply. Well, after more testing we found out that it actually depends (or it seems to be the reason at least) on used oauth access tokens. With some of them extended_entities are present in the response and with some of them not. Is anybody else seeing the same behavior?

5 weeks 6 days ago
froginthevalley
@froginthevalley Sylvain Carle

This should be available to all now, please let us know if you are not seeing extended_entities or are not able to POST.

Docs are at https://dev.twitter.com/docs/api/multiple-media-extended-entities.

6 weeks 2 days ago
nosuz
@nosuz nosuz

I am still not seeing extended_entities on getting statuses and the home_timelines.

Ex. Sorry for including non-English charactors.

  1. opening connection to api.twitter.com...
  2. opened
  3. <- "GET /1.1/statuses/show.json?id=472840878000574465 HTTP/1.1\r\nAccept: /\r\nUser-Agent: OAuth gem v0.4.7\r\nAccept-Encoding: deflate, gzip\r\nAuthorization: OAuth oauth_consumer_key=\"<SNIP>\", oauth_nonce=\"<SNIP>\", oauth_signature=\"<SNIP>\", oauth_signature_method=\"HMAC-SHA1\", oauth_timestamp=\"1401742274\", oauth_token=\"<SNIP>\", oauth_version=\"1.0\"\r\nHost: api.twitter.com\r\n\r\n"
  4. -> "HTTP/1.1 200 OK\r\n"
  5. -> "cache-control: no-cache, no-store, must-revalidate, pre-check=0, post-check=0\r\n"
  6. -> "content-encoding: gzip\r\n"
  7. -> "content-length: 1521\r\n"
  8. -> "content-type: application/json;charset=utf-8\r\n"
  9. -> "date: Mon, 02 Jun 2014 20:51:15 GMT\r\n"
  10. -> "expires: Tue, 31 Mar 1981 05:00:00 GMT\r\n"
  11. -> "last-modified: Mon, 02 Jun 2014 20:51:15 GMT\r\n"
  12. -> "pragma: no-cache\r\n"
  13. -> "server: tfe\r\n"
  14. -> "set-cookie: lang=ja\r\n"
  15. -> "set-cookie: guest_id=v1%3A140174227503705055; Domain=.twitter.com; Path=/; Expires=Wed, 01-Jun-2016 20:51:15 UTC\r\n"
  16. -> "status: 200 OK\r\n"
  17. -> "strict-transport-security: max-age=631138519\r\n"
  18. -> "x-access-level: read-write-directmessages\r\n"
  19. -> "x-content-type-options: nosniff\r\n"
  20. -> "x-frame-options: SAMEORIGIN\r\n"
  21. -> "x-rate-limit-limit: 180\r\n"
  22. -> "x-rate-limit-remaining: 179\r\n"
  23. -> "x-rate-limit-reset: 1401743175\r\n"
  24. -> "x-transaction: 87aa13c3c83c5bda\r\n"
  25. -> "x-xss-protection: 1; mode=block\r\n"
  26. -> "\r\n"
  27. reading 1521 bytes...
  28. -> ""
  29. -> 
  30. read 1521 bytes
  31. Conn keep-alive
  32. {
  33. "contributors" => nil
  34. "coordinates" => nil
  35. "created_at" => "Sat May 31 20:43:44 +0000 2014"
  36. "entities" =>
  37.   {
  38.   "hashtags" =>
  39.     [
  40.     ]
  41.   "media" =>
  42.     [
  43.       {
  44.       "display_url" => "pic.twitter.com/aLKT9TExhw"
  45.       "expanded_url" => "http://twitter.com/nosuz/status/472840878000574465/photo/1"
  46.       "id" => 472840860376510465
  47.       "id_str" => "472840860376510465"
  48.       "indices" =>
  49.         [
  50.         115
  51.         137
  52.         ]
  53.       "media_url" => "http://pbs.twimg.com/media/Bo_eQd4IMAESHd4.jpg"
  54.       "media_url_https" => "https://pbs.twimg.com/media/Bo_eQd4IMAESHd4.jpg"
  55.       "sizes" =>
  56.         {
  57.         "large" =>
  58.           {
  59.           "h" => 759
  60.           "resize" => "fit"
  61.           "w" => 1024
  62.           }
  63.         "medium" =>
  64.           {
  65.           "h" => 444
  66.           "resize" => "fit"
  67.           "w" => 599
  68.           }
  69.         "small" =>
  70.           {
  71.           "h" => 252
  72.           "resize" => "fit"
  73.           "w" => 340
  74.           }
  75.         "thumb" =>
  76.           {
  77.           "h" => 150
  78.           "resize" => "crop"
  79.           "w" => 150
  80.           }
  81.         }
  82.       "type" => "photo"
  83.       "url" => "http://t.co/aLKT9TExhw"
  84.       }
  85.     ]
  86.   "symbols" =>
  87.     [
  88.     ]
  89.   "urls" =>
  90.     [
  91.     ]
  92.   "user_mentions" =>
  93.     [
  94.     ]
  95.   }
  96. "favorite_count" => 2
  97. "favorited" => false
  98. "geo" => nil
  99. "id" => 472840878000574465
  100. "id_str" => "472840878000574465"
  101. "in_reply_to_screen_name" => nil
  102. "in_reply_to_status_id" => nil
  103. "in_reply_to_status_id_str" => nil
  104. "in_reply_to_user_id" => nil
  105. "in_reply_to_user_id_str" => nil
  106. "lang" => "ja"
  107. "place" => nil
  108. "possibly_sensitive" => false
  109. "retweet_count" => 1
  110. "retweeted" => false
  111. "source" => "<a href=\"http://twitter.com/download/android\" rel=\"nofollow\">Twitter for Android</a>"
  112. "text" => "ガーデンテラスから六甲山までの道はツツジがとっても綺麗だった。盛りは 過ぎてたけど、こんなにツツジがあるとは知らなかった。この季節にこのコースを歩くの初めてだったかな?時記憶力が弱いと普段は困るけど、こおいう時は何度も驚けてお得。 http://t.co/aLKT9TExhw"
  113. "truncated" => false
  114. "user" =>
  115.   {
  116.   "contributors_enabled" => false
  117.   "created_at" => "Fri May 27 22:31:46 +0000 2011"
  118.   "default_profile" => true
  119.   "default_profile_image" => false
  120.   "description" => "世界一周を目指し七つの言語(日本語 英語 Ruby PHP Java HTML SQL)を書き分けてどこまでも進みたいが、世界の果てだと思ったら最寄駅という井の中の蛙。週末は裏山で写真撮ったりハイキングしています。"
  121.   "entities" =>
  122.     {
  123.     "description" =>
  124.       {
  125.       "urls" =>
  126.         [
  127.         ]
  128.       }
  129.     "url" =>
  130.       {
  131.       "urls" =>
  132.         [
  133.           {
  134.           "display_url" => "postcard.st/nosuz/"
  135.           "expanded_url" => "http://www.postcard.st/nosuz/"
  136.           "indices" =>
  137.             [
  138.             0
  139.             22
  140.             ]
  141.           "url" => "http://t.co/dkcLmMpbLW"
  142.           }
  143.         ]
  144.       }
  145.     }
  146.   "favourites_count" => 70
  147.   "follow_request_sent" => false
  148.   "followers_count" => 260
  149.   "following" => false
  150.   "friends_count" => 344
  151.   "geo_enabled" => true
  152.   "id" => 306455217
  153.   "id_str" => "306455217"
  154.   "is_translation_enabled" => false
  155.   "is_translator" => false
  156.   "lang" => "ja"
  157.   "listed_count" => 11
  158.   "location" => "海と山の間"
  159.   "name" => "nosuz"
  160.   "notifications" => false
  161.   "profile_background_color" => "C0DEED"
  162.   "profile_background_image_url" => "http://abs.twimg.com/images/themes/theme1/bg.png"
  163.   "profile_background_image_url_https" => "https://abs.twimg.com/images/themes/theme1/bg.png"
  164.   "profile_background_tile" => false
  165.   "profile_image_url" => "http://pbs.twimg.com/profile_images/1376935749/NSicon_normal.png"
  166.   "profile_image_url_https" => "https://pbs.twimg.com/profile_images/1376935749/NSicon_normal.png"
  167.   "profile_link_color" => "0084B4"
  168.   "profile_sidebar_border_color" => "C0DEED"
  169.   "profile_sidebar_fill_color" => "DDEEF6"
  170.   "profile_text_color" => "333333"
  171.   "profile_use_background_image" => true
  172.   "protected" => false
  173.   "screen_name" => "nosuz"
  174.   "statuses_count" => 13179
  175.   "time_zone" => "Osaka"
  176.   "url" => "http://t.co/dkcLmMpbLW"
  177.   "utc_offset" => 32400
  178.   "verified" => false
  179.   }
  180. }

Updating statuses with media_ids works and I can see the multiple photos on Web page, but the API results have no extended_entities, just only entities.

Thank you.

6 weeks 2 days ago
jaakkosf
@jaakkosf jacob petrie

Are you still not seeing extended entities?

5 weeks 1 day ago
nosuz
@nosuz nosuz

No, I am still not seeing extended_entities, just entities on both my App and your developer console.

Twitter developer console snapshot is https://snap.apigee.com/1o9RtJR

5 weeks 1 day ago
jaakkosf
@jaakkosf jacob petrie

We're looking into this and hope to have an update for you from someone on the team shortly.

5 weeks 3 hours ago
iAutoApps
@iAutoApps iauto.apps

can't get multiple photos using api:
https://api.twitter.com/1.1/statuses/home_timeline.json

also tried
https://api.twitter.com/1.1/statuses/show/{id}.json

i have posted 3 pictures in this tweet, but i can only get one in media section, and no extended_media in reposonse

"media": [
{
"id": 473655124855111700,
"id_str": "473655124855111681",
"indices": [
0,
22
],
"media_url": "http://pbs.twimg.com/media/BpLC05cIQAEVGoN.png",
"media_url_https": "https://pbs.twimg.com/media/BpLC05cIQAEVGoN.png",
"url": "http://t.co/IZmkq3vmxG",
"display_url": "pic.twitter.com/IZmkq3vmxG",
"expanded_url": "http://twitter.com/iAutoApps/status/473655129678155777/photo/1",
"type": "photo",
"sizes": {
"medium": {
"w": 18,
"h": 18,
"resize": "fit"
},
"thumb": {
"w": 18,
"h": 18,
"resize": "crop"
},
"large": {
"w": 18,
"h": 18,
"resize": "fit"
},
"small": {
"w": 18,
"h": 18,
"resize": "fit"
}
}
}
]
},

6 weeks 1 day ago
tabtter
@tabtter Tabtter

Can I get extended_entities in the search/tweets and streams(I use statuses/sample)?
if not supported, is there any plans to support?

6 weeks 1 day ago
mttvll
@mttvll Matteo Villa

I'm also not able to retrieve extended_entities from my app (I'm using Twitter4j).
Using twurl I can see the new object, but when I perform the same request from my app I get a different JSON response (I'm using the same consumer key & secret, if that can help).

twurl /1.1/statuses/show/470059593737846785.json

(I'm also getting an "Access Denied" error on the documentation page, but only when I'm logged in).

6 weeks 1 day ago
testlink999
@testlink999 test tweet

Is this available to everyone or only to specific partners.
When i tried using this API, i got "Internal Service Error" with it.

REQUEST

POST /1.1/statuses/update.json?status=tt1&display_coordinates=false&media_ids=473779467069173760,473779756484542460 HTTP/1.1

X-HostCommonName:
api.twitter.com
Authorization:
OAuth oauth_consumer_key="DC0sePOBbQ8bYdC8r4Smg",oauth_signature_method="HMAC-SHA1",oauth_timestamp="1401792930",oauth_nonce="2761693087",oauth_version="1.0",oauth_token="322472919-rJFyTe8VhpzwgABeJLHEZmF7uWwP7xzgpAHu0o8L",oauth_signature="lIGtzDLvz3PCksbf%2BXkvuPqdmYQ%3D"
Host:
api.twitter.com
Content-Length:
0
X-Target-URI:
https://api.twitter.com
Content-Type:
application/x-www-form-urlencoded; charset=UTF-8
Connection:
Keep-Alive

===========

RESPONSE

HTTP/1.1 500 Internal Server Error

x-frame-options:
SAMEORIGIN
content-type:
application/json; charset=utf-8
last-modified:
Tue, 03 Jun 2014 10:55:30 GMT
status:
500 Internal Server Error
date:
Tue, 03 Jun 2014 10:55:30 GMT
x-transaction:
123c19cd017d1f8e
pragma:
no-cache
cache-control:
no-cache, no-store, must-revalidate, pre-check=0, post-check=0
x-xss-protection:
1; mode=block
x-content-type-options:
nosniff
expires:
Tue, 31 Mar 1981 05:00:00 GMT
set-cookie:
lang=en
set-cookie:
guest_id=v1%3A140179293064373993; Domain=.twitter.com; Path=/; Expires=Thu, 02-Jun-2016 10:55:30 UTC
content-length:
52
server:
tfe
strict-transport-security:
max-age=631138519
x-access-level:
read-write-directmessages

{
"errors": [
{
"message": "Internal error",
"code": 131
}
]
}

6 weeks 1 day ago
jaakkosf
@jaakkosf jacob petrie

The domain for uploading is upload.twitter.com, instead of api.twitter.com. Give that one a shot as everyone with valid credentials and write access should have permission to use this.

5 weeks 1 day ago
osakasaul
@osakasaul Saul Fleischman

Suggest looking at RiteTag API - http://ritetag.com/rest-api for hashtag-grading and associated hashtags.

5 weeks 4 days ago
richardhyland
@richardhyland Richard Hyland

I'm not seeing extended_entities coming back in many cases too, showing fine on Web but not when querying the API directly

5 weeks 4 days ago
Soreebreaker
@Soreebreaker soreeXplosion

Is the maximum number of images that I can attach to a single tweet defined? I figured out that no more than 5 images can be attatched to one tweet, but still it's not defined in help/configuration. For the sake of completeness I'd like to see the number defined in the configuration.

4 weeks 5 days ago
c0okk
@c0okk Supardi

i can't see extended_entities on statuses/show or timeline.

4 weeks 3 days ago
LavleenSharma1
@LavleenSharma1 Lavleen Sharma

i can't see extended_entities on statuses

3 weeks 2 days ago
DJStacyBass
@DJStacyBass Stacy B

does this thread have anything to do with posting tweets from websites via the safari widget in IOS for iphone 5s? Im looking for some info regarding the error message "The tweet (http://followtheoutbreak.worldpress.com/) cannot be sent because the connection to twitter has failed"

If anyone can help me out id greatly appreciate it.

2 weeks 2 days ago