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
<a
href="https://twitter.com/share"
class="twitter-share-button"
data-url="http://witei.com{% url 'static_house_detail' house.pk %}"
data-count="none"
data-text="My text">
data-hashtags="my tags}">
Tweet
</a>
2 The script to go with it
<script>
!function(d,s,id){
var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';
if(!d.getElementById(id)){
js=d.createElement(s);
js.id=id;
js.src=p+'://platform.twitter.com/widgets.js';
fjs.parentNode.insertBefore(js,fjs);
}
}
(document, 'script', 'twitter-wjs');
</script>
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="http://www.witei.com{% url 'static_house_detail' house.pk %}" />
> {% for i in house.pictures.all|slice:":4" %}
> <meta name="twitter:image{{forloop.counter0}}" content="http://www.witei.com{{ 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.