Hello. I have assumed that the best way of making a user in my website post a tweet with an image is with a Twitter Card. If I am wrong, it would be great to know which one is the best option instead.

I’m new to Twitter Cards, and don’t really get how do they work. I have my website with all the meta tags needed for a Large Image Twitter Card, but… how do I make a button (or link, or whatever) able to create the pop up with the Twitter Card content? Do I have to type some href? I really don’t know, and any help would be appreciated.

My intentions are:

Once you click a button in my website, open a popup with a text and an image (i guess that would be the content set in the meta tags).

Call a callback function once the user shares the content on Twitter (with my web as context, obviously).

And another question. Can I modify the content of the meta tags (via javascript) so the content of the Tweet changes once I click that button/link/whatever? For example, I want the user to be able to change the text in the description, and I allow him to change the default value with an input text, which i will use as content of the meta tag twitter:description. Will that work?

Once you click a button in my website, open a popup with a text and an image (i guess that would be the content set in the meta tags).

As @niall explained, you can use the Tweet Button to open a popup, and, as you ask subsequently, you can indeed add custom text in there (see the documentation on Twitter for Websites). You won’t see an image in the popup, but you can add your URL, and when the URL is shared on Twitter, the card can be attached based on the meta tags you include in your site markup.

1_pruebas:

Call a callback function once the user shares the content on Twitter (with my web as context, obviously).