How to fixed 'Unable to render Card preview' twitter error?

John Smith picture John Smith · Mar 6, 2017 · Viewed 8.4k times · Source

I am trying to implement twitter share on my site. For this i have added these meta tags:

<meta property="twitter:card" content="summary_large_image"/>
<meta property="twitter:site" content="@abc"/>
<meta property="twitter:title" content="dummy text"/>
<meta property="twitter:description" content="dummy text"/>
<meta property="twitter:url" content="http://example.com/example"/>
<meta property="twitter:image:src" content="http://example.com/wp-content/uploads/2017/03/example.jpg"/>
<meta property="twitter:domain" content="The Example"/>

When i am trying to check card preview using twitter card validator. i get this error: ERROR: Fetching the page failed because it's denied by robots.txt.

For fix this issue. I have added these line in robot file on server:

User-Agent: google
User-Agent: googlebot
User-agent: Twitterbot
Crawl-delay: 10 

User-agent: *
Disallow: /

But i am still getting this issue. Please help me to sort out this issue.

Answer

WhereDidMyBrainGo picture WhereDidMyBrainGo · Mar 7, 2017

I never saw the robots.txt error.

Try adding <meta name="twitter:creator" content="@abc">

FWIW I don't use src on images.

Try <meta property="twitter:image" content="http://example.com/wp-content/uploads/2017/03/example.jpg"/>