Reputation: 21
I have done as the guide in Optimize Tweets with Cards, but it does not work like put my image and description in a card to share to others.
I want to share my webpage in a card for twitter.
<meta name="twitter:card" content="summary" />
<meta name="twitter:title" content="summary" />
<meta name="twitter:creator" content="summary" />
<meta name="twitter:image" content="https://stackoverflow.com/questions/56339282/how-to-share-my-webpage-to-twitter-in-a-card/are_6b65b534.jpg" />
<meta name="twitter:description" content="@ViewBag.Description" />
As I put the guide code in my webpage, I still just get a url when I share my webpage.
Thanks for your help.
Upvotes: 0
Views: 1060
Reputation: 594
You have to state the full URL of the image for it to work. Test it here: https://cards-dev.twitter.com/validator
Upvotes: 1
Reputation: 637
Please add the property attributes like:
<meta property="og:url" content="http://bits.blogs.nytimes.com/2011/12/08/a-twitter-for-my-sister/" />
<meta property="og:title" content="A Twitter for My Sister" />
<meta property="og:description" content="In the early days, Twitter grew so quickly that it was almost impossible to add new features because engineers spent their time trying to keep the rocket ship from stalling." />
<meta property="og:image" content="http://graphics8.nytimes.com/images/2011/12/08/technology/bits-newtwitter/bits-newtwitter-tmagArticle.jpg" />
Please the example from twitter Optimize Tweets with Cards. Also try to add full path of image like the example and full content in description tag.
Upvotes: 0