Galley card not appearing in timeline


Hi, I’m aware that gallery cards don’t appear on the timeline by default, one must click on ‘View Details’.

However, on the troubleshooting (, some alternatives are proposed. The only solution that could apply to my situation is the second one:

‘For photos and animated GIFs, upload the media directly with the Tweet or consider using the Twitter API to upload media.’

I don’t quite understand how I should upload the photos in the tweet, does this mean I should include their urls there too? I’d appreciate it if someone could shed some light on this.

P.S: I’m getting an ‘Access denied’ message when trying to access the API.


You’d use the button to attach an image to the Tweet, which would cause the images to be uploaded to Twitter.

If you’re getting an access denied message, have you authenticated? You probably don’t need to be using the API if you are just trying to post a card.


Thank you for your answer, I’d like some more explanation though.
I can clearly see that there is a button for uploading images when using Twitter.
How do I actually use it from my website though?

All answers I’m finding suggest using cards or seem outdated (How to include an image using Tweet Button from my website,).

On the denied access: yes, I’m authenticated, I’ve also tried logging out and in again.


I’m not sure. This implies you are trying to do something embedded in your website? I’m confused about what you’re trying to achieve. Can you walk us through it step by step?


Sure, sorry if I haven’t been clear enough.

I’m using a twitter button on my site to share the content of another page.
The site with the button on it has:

1 The button itself

  data-url="{% url 'static_house_detail' %}"
  data-text="My text">
  data-hashtags="my tags}">

2 The script to go with it

    var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';
  (document, 'script', 'twitter-wjs');

Then the page it shares (the one up in data-url) has the following meta tags:

> <meta name="twitter:card" content="gallery" />
> <meta name="twitter:title" content="My title"
> <meta name="twitter:description" content="My description"/>
> <meta name="twitter:url" content="{% url 'static_house_detail' %}" />
> {% for i in|slice:":4" %}
>   <meta name="twitter:image{{forloop.counter0}}" content="{{ i.pic.url }}">
> {% endfor %}

This takes up to four images and uses them for the gallery card. It’s working just fine, but the card doesn’t show expanded in the timeline and I’m looking for some way to be able to share the images and have them show on the timeline.


this is correct - Cards are not expanded in the timeline - you have to click into the detail of the Tweet, unless the Tweet is promoted via the Ads platform. This is behaving as expected.


Yes, so I was wondering if the second solution on the troubleshooting for this ( could be applied to my case and how.


You mean:

For photos and animated GIFs, upload the media directly with the Tweet

Simply attach the images to the Tweet when you create it (either on web or on mobile) and they will appear in the timeline.


Yes, that’s what I meant.
There’s no way to do it using the button from my website then? (Only a ‘tweet’ button shows up)


There’s no way to add images to Tweets generated / posted from the embedded Tweet button, no.