Hi guys,
We use upload media (/1.1/media/upload.json) to upload an image:
Example response:
{“media_id”:634344556188844032,“media_id_string”:“634344556188844032”,“size”:80893,“expires_after_secs”:86400,“image”:{“image_type”:“image\/png”,“w”:810,“h”:350}}
Then we use status update (/1.1/statuses/update.json) to create a new post and attach the uploaded image to the new post.
Example response:
{
“created_at”: “Thu Aug 20 12:41:44 +0000 2015”,
“id”: 634344563180703744,
“id_str”: “634344563180703744”,
“text”: “Four Billion-Dollar Startups That Were Told Their Idea Was Stupid \u2014 Medium by @benhoffman_ on @Medium https:\/\/t.co\/JqlKXPIaLx”,
“source”: "\u003ca href=\"
http: \ /\/www.snipandshare.com\ " rel=\"
nofollow\ “\u003eSnip and Share\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”: {
“id”: 3037627595,
“id_str”: “3037627595”,
“name”: “Cricketer”,
“screen_name”: “cricket15now”,
“location”: “United Kingdom”,
“description”: “Part-time cricketer, full-time techie”,
“url”: null,
“entities”: {
“description”: {
“urls”: []
}
},
“protected”: false,
“followers_count”: 24,
“friends_count”: 57,
“listed_count”: 3,
“created_at”: “Sat Feb 14 21:09:35 +0000 2015”,
“favourites_count”: 4,
“utc_offset”: null,
“time_zone”: null,
“geo_enabled”: false,
“verified”: false,
“statuses_count”: 483,
“lang”: “en”,
“contributors_enabled”: false,
“is_translator”: false,
“is_translation_enabled”: false,
“profile_background_color”: “C0DEED”,
“profile_background_image_url”: “http:\/\/abs.twimg.com\/images\/themes\/theme1\/bg.png”,
“profile_background_image_url_https”: “https:\/\/abs.twimg.com\/images\/themes\/theme1\/bg.png”,
“profile_background_tile”: false,
“profile_image_url”: “http:\/\/pbs.twimg.com\/profile_images\/621308091737485312\/YH-revo3_normal.jpg”,
“profile_image_url_https”: “https:\/\/pbs.twimg.com\/profile_images\/621308091737485312\/YH-revo3_normal.jpg”,
“profile_banner_url”: “https:\/\/pbs.twimg.com\/profile_banners\/3037627595\/1436966351”,
“profile_link_color”: “0084B4”,
“profile_sidebar_border_color”: “C0DEED”,
“profile_sidebar_fill_color”: “DDEEF6”,
“profile_text_color”: “333333”,
“profile_use_background_image”: true,
“has_extended_profile”: false,
“default_profile”: true,
“default_profile_image”: false,
“following”: false,
“follow_request_sent”: false,
“notifications”: false
},
“geo”: null,
“coordinates”: null,
“place”: null,
“contributors”: null,
“is_quote_status”: false,
“retweet_count”: 0,
“favorite_count”: 0,
“entities”: {
“hashtags”: [],
“symbols”: [],
“user_mentions”: [{
“screen_name”: “benhoffman_”,
“name”: “Benjamin Hoffman”,
“id”: 2237163510,
“id_str”: “2237163510”,
“indices”: [78, 90]
}, {
“screen_name”: “Medium”,
“name”: “Medium”,
“id”: 571202103,
“id_str”: “571202103”,
“indices”: [94, 101]
}],
“urls”: [{
“url”: “https:\/\/t.co\/JqlKXPIaLx”,
“expanded_url”: “https:\/\/medium.com\/benhoffman\/four-billion-dollar-startups-that-were-told-their-idea-was-stupid-97a02cfa5e7?_ts=1440074551149”,
“display_url”: “medium.com\/benhoffman\/fo\u2026”,
“indices”: [102, 125]
}]
},
“favorited”: false,
“retweeted”: false,
“possibly_sensitive”: false,
“lang”: “en”
}
Result: Image is missing.
Issue is that it is happening randomly. Sometimes images are displayed and sometimes they are not.
What could potentially be the issue?
Thank you guys!