Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Twitter added a new set of meta tags called "cards".
Related issue for Nodewords: #1664324: Add support for Twitter's new "cards" metatags
Comment | File | Size | Author |
---|---|---|---|
#20 | metatag-n1664322-20.patch | 11.52 KB | DamienMcKenna |
#18 | metatag-n1664322-15_0.patch | 10.06 KB | alexweber |
#16 | metatag-n1664322-15.patch | 10.06 KB | alexweber |
#15 | metatag-n1664322-15.patch | 521 bytes | alexweber |
#14 | metatag-n1664322-13.patch | 10.03 KB | DamienMcKenna |
Comments
Comment #1
nico059 CreditAttribution: nico059 commentedI just realease a sandbox project here: http://drupal.org/sandbox/nico059/1741784
I name it metatag_twittercard (could be changed if needed).
The code is inspired from the metatag_opengraph module.
Very basic for now (only support summary card type), but I will add the 2 others type asap
I'm waiting to participate to Twitter Card to test this module, so use at your own risk ;-)
Twitter Cards support the OpenGraph meta tags, so I leverage on this metatags (og:xyz..) for the description, title, image etc ... Not sure yet if this is the good strategy or if it's better to make metatag_twittercard independant (without dependency to the metatag_opengraph module)
Give me some feedback on this module and which feature you see important,
Enjoy ;-)
Comment #2
Paisible CreditAttribution: Paisible commented+1
I vote for this feature too.
Comment #3
Tanzaho CreditAttribution: Tanzaho commentedI ma also following this thread since I am really interested.
Comment #4
Tanzaho CreditAttribution: Tanzaho commentedI used it, and added the 'image' and 'description' tag. Waiting for twitter approval now.
Comment #5
nico059 CreditAttribution: nico059 commentedHi Tanzaho, thank you for your interest in this small module.
Could you please share the code you added for image and description? A patch, I could merge ?
Thx,
Nico.
Comment #6
Tanzaho CreditAttribution: Tanzaho commentedI just sent you a mail. Check it out...
Comment #7
ipwa CreditAttribution: ipwa commentedI guess the next step would be for nico059 to make a patch on from Meta tags HEAD, adding his module as a sub module of Meta tags.
Comment #8
kerasai CreditAttribution: kerasai commentedPatch rolled from latest 7.x-1.x.
Comment #9
DamienMcKennaGood work, but metatag_twittercard_metatag_config_default_alter() needs to be updated for the Twitter tags :)
Comment #10
DamienMcKennaAnd another sandobx: http://drupal.org/sandbox/miechiel/1835414
Comment #11
miechiel CreditAttribution: miechiel commentedI also started a sandbox project (see #10) to extend metatag with Twitter Cards metatag. Here is my work patched on nico059 sandbox.
This patch adds more twitter cards metatags and is using a proper metatag_twittercard_metatag_config_default_alter() function. I also added the dependency in the info file.
I'am also thinking in adding more functionality for "media" files such as images and audio/video. So that the "player" and "image" Twitter Card can be used.
Comment #12
idflood CreditAttribution: idflood commentedHere is a patch from miechiel sandbox with some little fixes (3 whitepace issue and a double break at the same spot).
@DamienMcKenna: Anything else to have this committed to metatag?
Comment #13
DamienMcKennaHow's about this? :)
Comment #14
DamienMcKennaDoh.
Comment #15
alexweber CreditAttribution: alexweber commentedThe patch in #14 works partially as the "twitter:card" metatag's options and human-readable name are switched so it outputs the administrative title instead of the actual value in the metatag. Also, the site's twitter account should have its context set to to global.
Patch attached.
Comment #16
alexweber CreditAttribution: alexweber commentedDoh! Correct patch attached.
Comment #18
alexweber CreditAttribution: alexweber commentedgetting my butt kicked. this one should do it.
Comment #19
alexweber CreditAttribution: alexweber commentedComment #20
DamienMcKennaI decided to add a README.txt file for the submodule.
Comment #21
DamienMcKennaCommitted! Thanks everyone!
Comment #22
DamienMcKennaTag.
Comment #23
DamienMcKennaVersion 7.x-1.0-beta3 has been released and includes this work. Am closing this issue in an effort to keep the issue queue clean. Thank you all for your continued help!
Comment #24
alexweber CreditAttribution: alexweber commentedAwesome :)
Comment #25
jbrown CreditAttribution: jbrown commentedThis needs to be documented on the module front page.
Comment #26
Dave ReidAdded to homepage.
Comment #27
jbrown CreditAttribution: jbrown commentedThanks!
Comment #27.0
jbrown CreditAttribution: jbrown commentedAdded a link to the corresponding Nodewords issue.