12

I have issues with Twitter share button, I have this code as an input:

<meta name="twitter:card"        content="summary">
<meta name="twitter:site"        content="@citydesigning">
<meta name="twitter:title"       content="City Design">
<meta name="twitter:description" content="I recommend this epic City Design online course at https://stepic.org/city #stepiccity">
<meta name="twitter:creator"     content="citydesigning">
<meta name="twitter:image:src"   content="https://stepic.org/static/classic/city/images/sharepic.png">

and

<a class="twitter" 
   href="https://twitter.com/intent/tweet?url=https://stepic.org/city" 
   target="_blank"></a>

But it returns no results when sharing, only this text: "https://stepic.org/city" instead of all Twitter card information (like image and some text) when clicking "View summary" on Twitter's feed.

Can you help me, pleasee?

Alex Cio
  • 6,014
  • 5
  • 44
  • 74
user2889334
  • 141
  • 1
  • 2
  • 5

4 Answers4

10

Domains need to be approved before Twitter Cards will work. Use Twitter's validator and then click "request approval":

https://cards-dev.twitter.com/validator

Shankar
  • 417
  • 1
  • 6
  • 17
Dan Leveille
  • 3,001
  • 2
  • 24
  • 28
  • How long will it take to work after it has been approved? My website was approved 2 weeks ago and whenever I share a link of it, no card is shown, plan text link only. – Cojones Jan 14 '15 at 18:25
  • 2
    I'm having the same problem. The card looks perfect in the twitter validator, but the "Share a link with your followers" only contains the text and url with no card attached. – Joshua W Mar 03 '15 at 21:27
  • same problem here. Was solution found? – Masinde Muliro Mar 13 '15 at 16:00
  • I also have to ask if you found a solution? – Anders Lindén Jun 03 '15 at 12:23
  • Also jumping in on this - our domain is whitelisted for a summary card. I can't get anything other than the url to "Tweet". No card. – Duffy Dolan Jul 01 '15 at 16:41
  • Same problem here. Did any one of you found the solution. @Cojones – Abhishek Aug 25 '15 at 18:28
  • It actually started working a few weeks after I approved my website. – Cojones Aug 26 '15 at 08:00
  • Yes @Cojones its working now. The problem was the port number in the URL which I was using earlier (due to which it was not getting validated at twitter website) then I replace it with only domain name and it worked. For others always give the URL in tweet-intent where your twitter meta tag is defined.And once the tweet is posted look for 'view summary' below tweet text. – Abhishek Sep 09 '15 at 16:50
7
  1. Validate your twitter card via https://cards-dev.twitter.com/validator

  2. HTML code is :

    <a href="http://www.twitter.com/intent/tweet?url=http://your-url&text=caption">tweet</a>
    

    You will only see caption text and url. but, when you share via click tweet button, you will see summary card, your profil page.

w3spi
  • 4,380
  • 9
  • 47
  • 80
Fatih Topcu
  • 132
  • 2
  • 3
1

In-order to display the image, replace:

<meta name="twitter:card" content="summary">

with:

<meta name="twitter:card" content="summary_large_image">

and also check whether the twitter crawler is able to access it properly by entering the url to https://cards-dev.twitter.com/validator

Dawn T Cherian
  • 4,968
  • 3
  • 24
  • 35
0

This is actually the expected behaviour. Twitter cards do not show up in the Tweet share dialog but when you click the tweet button in your share dialog, it will be displayed on twitter as a card. https://twittercommunity.com/t/card-validator-is-working-but-website-share-show-different-content/36092/2

Mudiaga Ejenavi
  • 1,050
  • 2
  • 14
  • 21