1

How to share images along with details on twitter and how to create twitter account for website

I tried meta tag but its not working

<head> 
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:site" content="@TodayKrishna">
<meta name="twitter:creator" content="@TodayKrishna">
<meta name="twitter:title" content="Parade of Fans for Houston’s Funeral">
<meta name="twitter:description" content="NEWARK - The guest list a more suited to a red carpet event in .">
<meta name="twitter:image" content="http://graphics8.nytimes.com/images/2012/02/19/us/19whitney-span/19whitney-span-articleLarge.jpg">
</head>

  
  
<a class="twitter" href="https://twitter.com/intent/tweet?url=https://res.cloudinary.com/orgtesting/image/upload/f_auto/q_auto/c_lpad,h_600,w_600/v1506343211/KFTtesting/{{imgs.artFileName}};text=Check out this great piece of art @Krishnafortoday.com" target="_blank">
    
<img  class="YOUR_FB_CSS_STYLING_CLASS" src="img/twt.png" width="22px" height="22px" alt="">       

</a>
  • Hi Ajith, could you please show us some of the code you've written? This will make it easier for us to tell you how to fix it. Thanks :-) – Terence Eden Feb 12 '19 at 11:26
  • Hi Terence Eden, lot of thanks for response, I have attached the code please check and give me solution. If possible suggest any other ways for sharing images along with details from own website to Twitter account. Thanks – Ajith Kumar Feb 12 '19 at 11:51
  • https://i.stack.imgur.com/1a2zR.png This is the URL for site – Ajith Kumar Feb 12 '19 at 12:09
  • Hi Terence Eden, I have updated the url link:https://i.stack.imgur.com/RW9hR.png When i click on twitter button my expected Target to view as you shown on your twitter page. Note:kindly click on given link.https://i.stack.imgur.com/RW9hR.png – Ajith Kumar Feb 12 '19 at 12:40

1 Answers1

-1

There are a few mistakes here. Let me try to explain to you.

Your website URL is localhost:83. That website is located on your computer. There is no way for Twitter to reach that website. So it cannot see the metatags.

The image URL you are sharing https://res.cloudinary.com/orgtesting... just links to an image. So there are no metatags for Twitter to see.

Here is how to fix it:

  • You need to create a website which Twitter can access.
  • On that website, you need an HTML page.
  • The HTML page needs to have the metatags on it.

You can test the URL of the page by using Twitter's tool - https://cards-dev.twitter.com/validator

Terence Eden
  • 14,034
  • 3
  • 48
  • 89
  • Hi Terence Eden i need your help i created meta tag for twitter share but how to call button functionality ? could you guide me!!! – Ajith Kumar Feb 27 '19 at 19:38
  • You need to ask a new question on the site. – Terence Eden Feb 28 '19 at 07:27
  • Yeah i have asked new question this is the URL :https://stackoverflow.com/questions/54914134/how-to-share-post-on-twitter-along-with-post-details-by-using-angularjs-javascri – Ajith Kumar Feb 28 '19 at 11:46