According to the documentation https://dev.twitter.com/docs/cards the image tag should use meta but a link is generated instead.

The current code generates:
<link property="twitter:image" content="https://example.com/test.png" />

It should output:
<meta property="twitter:image" content="https://example.com/test.png" />

Files: 
CommentFileSizeAuthor
#2 metatag-n1864340.patch2.29 KBDamienMcKenna
PASSED: [[SimpleTest]]: [MySQL] 11 pass(es).
[ View ]
#1 metatag-twitter_card_fix-1864340-1.patch1 KBcdoyle
PASSED: [[SimpleTest]]: [MySQL] 11 pass(es).
[ View ]

Comments

cdoyle’s picture

Status:Active» Needs review
StatusFileSize
new1 KB
PASSED: [[SimpleTest]]: [MySQL] 11 pass(es).
[ View ]

Line 125 of the metatag_twitter_cards.metatag.inc should use 'DrupalTextMetaTag' instead of 'DrupalLinkMetaTag'.

DamienMcKenna’s picture

StatusFileSize
new2.29 KB
PASSED: [[SimpleTest]]: [MySQL] 11 pass(es).
[ View ]

Ah, I used DrupalLinkMetaTag instead of DrupalTextMetaTag for several items. Looking at it further, I think the classes are incorrectly named, but that's a different issue.

cdoyle’s picture

Yeah, that very well could be. I was only using twitter:image so that's the only one I noticed/patched but it does look like there are other instances.

DamienMcKenna’s picture

Status:Needs review» Fixed

Committed! Thanks for finding this, cdoyle.

Status:Fixed» Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.