API Call Not Returning Media Data


#1

When using these parameters the Twitter API is not returning media data.

Example post that is not returning media data: https://twitter.com/JWSahar/status/819454364750348290

https://api.twitter.com/1.1/statuses/show.json

id: 826393380024369152

access token: 555929166-KmHH3QuG1IHicIsapYyUy2MkkuxuUhp9eO647ZNY


#2

You shouldn’t post your access tokens.


#3

Are you using tweet_mode=extended on the API call?


#4

Hi Andy,

We have changed our API call to add tweet_mode=extended and the API responded with a 401 unauthorized


#5

What language are you using? What client library are you using. This is really hard to debug based on this minimal information. Can you share code examples?


#6

We are using C#. This is the JSON being returned for the Tweet missing media data in question:

{
“created_at”: “Thu Jan 12 08:01:59 +0000 2017”,
“id”: 819454364750348300,
“id_str”: “819454364750348290”,
“text”: “The holidays may seem long gone but all you need to do is devour a few Marzipans to bring them back!… https://t.co/8O46eHK9bd”,
“truncated”: true,
“entities”: {
“hashtags”: [],
“symbols”: [],
“user_mentions”: [],
“urls”: [
{ “url”: “https://t.co/8O46eHK9bd”, “expanded_url”: “https://twitter.com/i/web/status/819454364750348290”, “display_url”: “twitter.com/i/web/status/8…”, “indices”: [ 102, 125 ] }
]
},
“source”: “<a href=“https://about.twitter.com/products/tweetdeck” rel=“nofollow”>TweetDeck”,
“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”: 2951805253,
“id_str”: “2951805253”,
“name”: “JW Marriott Sahar”,
“screen_name”: “JWSahar”,
“location”: “”,
“description”: “Welcome to the official twitter page of JW Marriott Mumbai Sahar.”,
“url”: “https://t.co/NZiCoheTre”,
“entities”: {
“url”: {
“urls”: [
{ “url”: “https://t.co/NZiCoheTre”, “expanded_url”: “http://www.jwmumbai.com/”, “display_url”: “jwmumbai.com”, “indices”: [ 0, 23 ] }
]
},
“description”:
{ “urls”: [] }
},
“protected”: false,
“followers_count”: 1666,
“friends_count”: 263,
“listed_count”: 48,
“created_at”: “Tue Dec 30 09:36:18 +0000 2014”,
“favourites_count”: 4871,
“utc_offset”: 19800,
“time_zone”: “Mumbai”,
“geo_enabled”: true,
“verified”: false,
“statuses_count”: 4708,
“lang”: “en”,
“contributors_enabled”: false,
“is_translator”: false,
“is_translation_enabled”: false,
“profile_background_color”: “1A1B1F”,
“profile_background_image_url”: “http://abs.twimg.com/images/themes/theme9/bg.gif”,
“profile_background_image_url_https”: “https://abs.twimg.com/images/themes/theme9/bg.gif”,
“profile_background_tile”: false,
“profile_image_url”: “http://pbs.twimg.com/profile_images/565035121116332033/oVGGABiT_normal.png”,
“profile_image_url_https”: “https://pbs.twimg.com/profile_images/565035121116332033/oVGGABiT_normal.png”,
“profile_banner_url”: “https://pbs.twimg.com/profile_banners/2951805253/1495693701”,
“profile_link_color”: “2FC2EF”,
“profile_sidebar_border_color”: “181A1E”,
“profile_sidebar_fill_color”: “252429”,
“profile_text_color”: “666666”,
“profile_use_background_image”: true,
“has_extended_profile”: false,
“default_profile”: false,
“default_profile_image”: false,
“following”: false,
“follow_request_sent”: false,
“notifications”: false,
“translator_type”: “none”
},
“geo”: null,
“coordinates”: null,
“place”: null,
“contributors”: [
624669553
],
“is_quote_status”: false,
“retweet_count”: 0,
“favorite_count”: 1,
“favorited”: false,
“retweeted”: false,
“possibly_sensitive”: false,
“lang”: “en”
}


#7

Yes. So what library are you using and how is that parameter being added to the call? Can you reproduce using twurl?


#8

We do not use a library to make the calls, but instead generate our own calls. the tweet_mode parameter is added to the call as any other parameter like user_id.


#9

Any thoughts on this issue?


#10

The only thing I can tell you is that I’m able to fetch Tweet ID 819454364750348290 with tweet_mode=extended perfectly using both twurl and a Twitter Kit based iOS app, so I can only assume there’s an issue with the call your app is making.