105329 vues

Twitter Cards

Sébastien Merour
publié le 13/06/2020 à 14h04 | modifé le 13/06/2020 à 15h44
Catégorie : Front-EndCommentaires (102)
Twitter Cards
Description

Par le terme de "Twitter Cards", on entend 2 choses :

-les cards "Twitter" permettant d'afficher un tweet sur Twitter

-les balises "Twitter Cards" insérées dans les balises meta d'un site web, afin que Twitter puisse afficher un tweet correctement

Les Cards "Twitter"

Vous l'aurez remarqué : lorsque vous consultez Twitter, les tweets ne s'affichent pas tous de la même façon. Certains sont de simples textes (phrases courtes...), alors que d'autres tweets sont enrichis de photos, de vidéos...

Concernant les tweets enrichis, on distingue 2 catégories :

-le tweet enrichi depuis Twitter : l'utilisateur poste un tweet en y ajoutant une photo, ou une vidéo. Dans ce type de cas, le tweet ne fait appel à aucun site web extérieur. L'utilisateur insére des photos ou des vidéos qui sont présents sur son device (mobile, PC...)

-le tweet enrichi grâce à un site tiers : dans ce cas, lorsque l'utilisateur poste un lien menant à un site web (par exemple un lien vers un article de presse), Twitter insère automatiquement des éléments pour enrichir le tweet (le plus souvent il s'agit par exemple d'un aperçu photo d'un article de presse posté sur un site web. C'est dans ce cas de figure qu'interviennent les balises meta "Twitter Cards".

Plusieurs types de Twitter Cards existent :

- Summary Card : elle affiche un aperçu du site web de référence. L'aperçu contient le titre ou bien une description du document. On y voit aussi une vignette d'aperçu.

- Summary Card avec image large : c'est la même chose, mais cette fois avec une photo bien plus large qui occupe toute la largeur du fil Twitter.

- Photo Card : La Card ne contient qu'une photo. Le contenu standard du tweet intégre également l'auteur, la source et un lien externe.

- Gallery Card.  Seule différence avec la Photo Card : cette fois, plusieurs photos sont affichées.

- App Card. Elle permet d'afficher une application Android ou iOS. La card contient une courte description (celle présente dans l'App Store), ainsi qu'un lien de téléchargement de l'application.

- Player Card. Comme on peu le deviner, ce type de Card affiche des vidéos ou des fichiers audio.

- Product Card. Elle est destinée à ceux voulant faire la promotion d'un produit. Elle affiche un produit avec 2 caractéristiques définies par l'utilisateur. Il peut s'agir de la catégorie du produit, du prix...

 

Les balises meta "Twitter Cards"

Afin d'afficher correctement des Twitter Cards sur Twitter, il est nécessaire d'ajouter des balises meta Twitter Cards sur le site de référence.

3 balises sont obligatoires :

 

La 1ère balise, "twitter:card" correspond à la description courte du site web

Les 2 autres "twitter:site" et "twitter:creator" correspondent au compte Twitter de l'utilisateur.

A noter : si le site web contient les balises Open Graph suivantes : og:type ; og:title ; og:description sont présentes et si la balise twitter:card est absente, alors le summary sera quand même affiché sur Twitter. Lorsque Twitter crawle le site web, il vérifie si des balises Open Graph sont présentes.

Voici quelques exemples de balises Twitter :

twitter:description

Cette balise doit contenir la description de l'article. Elle ne doit pas dépasser 200 caractères.

twitter:title

Comme son nom l'indique, celle-ci contient le titre. Limitée à 70 caractères.

twitter:image

URL de l'image à insérer dans la card. A noter : l'image doit faire moins de 5 Mo. Les formats supportés sont : JPG, PNG, WEBP et GIF. Dans le cas d'un GIF, seule la première frame est affichée. Le format SVG n'est pas supporté.

twitter:image:alt

Description de l'image. Maximum autorisé : 420 caractères.

twitter:player

URL du player vidéo ou audio.

twitter:player:width

Largeur en pixels du player.

twitter:player:height

Hauteur en pixels du player

A quoi ça sert ?

Les Twitter Cards ont un intérêt évident : plus le tweet est enrichi (présence d'une description, d'une vignette, d'une vidéo...), plus le lien aura des chances d'être cliqué, et ainsi il permettra de générer du traffic sur le site web. Attention cependant : certains éléments comme les vidéos, ne vont pas forcément générer du traffic, car dans le cas des vidéos, l'utilisateur peut se contenter de visionner intégralement la vidéo sur Twitter sans visiter le site web.

Fonctionnalités
SEO / Réseaux Sociaux
Créateur
Twitter
Liens
Aux dernières nouvelles
Rien à signaler.

102 Commentaire(s)
  1. user
    1win_haot
    13/03/2025 à 22h48  commentaire modifé

  2. user
    Danielquome
    13/03/2025 à 13h53  commentaire modifé
    “You get some of me but not tomorrow as they want me in as soon as I can make it happen. This is the one time when they say jump and I ask how high due the financial gains the company could benefit from and it being important enough for the client to appear in person.” “Well I get an extra night of you at least! I wonder what we could do with that? Meantime, what about food? I am starving and delicious as it was a second breakfast is not quite enough to replenish me!” “Well get something on and we’ll sort that out first.” We drove into town and decided that a daytime visit to Charlie’s was going to be the answer. I parked in the bar lot and Elise dashed in to change into something more appropriate, jeans and a t-shirt along with her biker jacket but keeping her Converses on. Walking down to the restaurant was different from the middle of the night visits as the streets were bustling and all of the shops and outlets were open. Reaching Charlie’s we entered the front door and sat in a booth near the window. A beautiful young American Chinese girl came,smiled and said hello to Elise and gave us menus and asked if we wanted drinks in the meantime. "No thanks Lin just a pot of Jasmine tea for us please." Lin went back to the kitchen area. “No booze for me today as I will have to work in the bar so it is just tea for me.” Not in a drinking mood either, I agreed with her." https://www.hentai-foundry.com/user/fixin1989/profile https://rentry.org/9cx3r47g https://okwave.jp/profile/u3121144.html https://okwave.jp/profile/u3140766.html https://www.obesityhelp.com/members/mihhas1972/about_me/

  3. user
    Danielquome
    13/03/2025 à 12h50  commentaire modifé
    “You get some of me but not tomorrow as they want me in as soon as I can make it happen. This is the one time when they say jump and I ask how high due the financial gains the company could benefit from and it being important enough for the client to appear in person.” “Well I get an extra night of you at least! I wonder what we could do with that? Meantime, what about food? I am starving and delicious as it was a second breakfast is not quite enough to replenish me!” “Well get something on and we’ll sort that out first.” We drove into town and decided that a daytime visit to Charlie’s was going to be the answer. I parked in the bar lot and Elise dashed in to change into something more appropriate, jeans and a t-shirt along with her biker jacket but keeping her Converses on. Walking down to the restaurant was different from the middle of the night visits as the streets were bustling and all of the shops and outlets were open. Reaching Charlie’s we entered the front door and sat in a booth near the window. A beautiful young American Chinese girl came,smiled and said hello to Elise and gave us menus and asked if we wanted drinks in the meantime. "No thanks Lin just a pot of Jasmine tea for us please." Lin went back to the kitchen area. “No booze for me today as I will have to work in the bar so it is just tea for me.” Not in a drinking mood either, I agreed with her." https://www.haikudeck.com/presentations/kT6hNHYHUk https://kraused1978.diary.ru/ https://chyoa.com/user/ghoq1967 https://cannabis.net/user/152813 https://rentry.org/o7g3hfp9

  4. user
    Danielquome
    13/03/2025 à 12h40  commentaire modifé
    “You get some of me but not tomorrow as they want me in as soon as I can make it happen. This is the one time when they say jump and I ask how high due the financial gains the company could benefit from and it being important enough for the client to appear in person.” “Well I get an extra night of you at least! I wonder what we could do with that? Meantime, what about food? I am starving and delicious as it was a second breakfast is not quite enough to replenish me!” “Well get something on and we’ll sort that out first.” We drove into town and decided that a daytime visit to Charlie’s was going to be the answer. I parked in the bar lot and Elise dashed in to change into something more appropriate, jeans and a t-shirt along with her biker jacket but keeping her Converses on. Walking down to the restaurant was different from the middle of the night visits as the streets were bustling and all of the shops and outlets were open. Reaching Charlie’s we entered the front door and sat in a booth near the window. A beautiful young American Chinese girl came,smiled and said hello to Elise and gave us menus and asked if we wanted drinks in the meantime. "No thanks Lin just a pot of Jasmine tea for us please." Lin went back to the kitchen area. “No booze for me today as I will have to work in the bar so it is just tea for me.” Not in a drinking mood either, I agreed with her." https://okwave.jp/profile/u3130559.html https://haveagood.holiday/users/390239 https://okwave.jp/profile/u3141169.html https://haveagood.holiday/users/355428 https://shock071995.diary.ru/

  5. user
    mostbet_bamr
    13/03/2025 à 12h40  commentaire modifé
    скачать мостбет официальный сайт https://mostbet1002.com.kg .

Ajoutez un commentaire :