Search code examples
htmltwittertwitter-card

Twitter card not rendering -- ERROR: Invalid card name (Card error)


I encountered

problem ERROR: Invalid card name (Card error)

when testing my app's url in the Twitter Card validator. More specifically, these are the full logs from the Validator:

INFO:  Page fetched successfully
INFO:  20 metatags were found
INFO:  twitter:card = “summary_large_image” tag found
ERROR: Invalid card name (Card error)

Here are my meta tags:

<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<meta name="theme-color" content="#1E3A50">
            
<meta property="og:title" content="Claim this Redeemable NFT">
<meta property="og:image" content="https://flowerpatch.app/polygon/render/card-39786.png">
<meta property="og:image:height" content="200">
<meta property="og:image:width" content="300">
<meta property="og:url" content="https://redeemable.app/r/0x0b4a401a678e60c988fb159b31a45fc0980af65a56279197b0002eb1779843b7">
            
<meta property="og:type" content="website">
<meta property="og:description" content="From: 0xc1D622d588B92D2F7553c6fe66b1Ce6C52ec36f9">
<meta name="twitter:card" content="“summary_large_image”">
<meta name="twitter:site" content="@redeemableNFT">
<meta name="twitter:title" content="Claim this Redeemable NFT">
<meta name="twitter:description" content="From: 0xc1D622d588B92D2F7553c6fe66b1Ce6C52ec36f9">
<meta name="twitter:image:src" content="https://flowerpatch.app/polygon/render/card-39786.png">
<meta name="description" content="From: 0xc1D622d588B92D2F7553c6fe66b1Ce6C52ec36f9">
<meta name="keywords" content="Redeemable, NFT, Reward">
        

What is the problem with my twitter card meta tags? I believe I followed the Twitter Card docs correctly. I tried both twitter:image and twitter:image:src, so that's not it either. What does "Invalid card name" refer to?


Solution

  • The issue turned out to be the quotation mark as @Satya pointed out. I swapped:

    <meta name="twitter:card" content="“summary_large_image”">

    with

    <meta name="twitter:card" content="summary_large_image">

    and the Twitter Cards work like a charm!