Do Twitter Cards work with POST statuses/update_with_media and POST statuses/update?


I’ve implemented Twitter cards on a page with this structure: It is validated and whitelisted. When I manually tweet the URL, the Twitter Card display correctly.

However, manually tweeting the URL isn’t the normal behaviour – tweets containing the URL are posted using the API. I’m using the update_with_media API method to tweet the URL with an image. When tweeting the URL with media, the card doesn’t appear.

Is this intended behaviour or is it a bug? Will switching to the newer POST statuses/update API method solve this?



If you’re posting media then the image that gets uploaded to will be displayed, rather than the card - is that what you’re seeing? update_with_media is deprecated so I’d avoid it, in general, if you can.


I assume even when media is uploaded using the newer statuses/update API method (rather than the deprecated method), the card will still not display?


Yes, I believe that is correct, as there is no way to display both kinds of media (image, or card) alongside the Tweet.


I wonder what could be my error… Can you leave me some pointers on where I should change my logic.

When I use ‘’ - (depricated) to update my status with image, it was successfully posting, however like you pin point, image and cards won’t show at the same time.

So when I use ‘’, I can still post successfully, the card is showing. however the image won’t attach to that tweet (done without card’s url). I use ‘’ to upload the media.

the actual media return was constructed like this:

“expires_after_secs” = 86400;
image = {
h = 520;
“image_type” = “image/jpeg”;
w = 329;
“media_id” = 725313562713808896;
“media_id_string” = 725313562713808896;
size = 17503;

So, I tried this parameters.
let params = [“status”: message, “media_ids”: 725313562713808896 ]


let params = [“status”: message, “media_ids”: [725313562713808896] ] // expecting it to be an array of ‘media_ids’

Result: It was successful on both parameters but the image won’t show and just the tweet (card url is working here). I used the same image I used in ‘

Sequence: I uploaded first the media to ‘’ to get the media_id then proceed to the ‘’ with the above parameters


okay It was resolved. I used ‘media_id_string’ was using ‘media_id’ before. I can see the image now. I will not remove my post so if someone stumbled on this same issue they could make it as a reference.