Updated: Comment #1
Problem/Motivation
At the moment if a d.o issue is posted on twitter, it is just a link with no additional information. It would be really nice if we could get druplicon like functionality whereby twitter gives a basic summary of the issue in the form of a twitter card.
Proposed resolution
Let's add metadata tags to the drupal issue node markup so that twitter (and other sites) can get better information from links.
Add metatags directly to the markup (maybe in a template file)
Remaining tasks
- Agree on which fields to add to card
Work in Progress list:
- Druplicon
- Drupal
- Project
- Title
- Status
- Priority
- Category
- all tags
- Install metatag module
- Add metatags and export to code
- Review permissions
- Get code live to d.o
- Validate and apply to twitter approval
- Enjoy
Metatag Module
Twitter Card Docs
This issue was inspired by a tweet by @YesCT who noticed github twittercards.

Comments
Comment #1
yanniboi commentedI have started working on this on a d.o dev server.
I am implementing a preprocess function to put the metatags in the page header on issue nodes.
We can not test from the drupal servers directly because they don't allow site crawling preventing twiiter to directly check pages for metadata.
So far I have implemented a summary card with the following code:
Using the twitter card validator tool this gives us the following card:
Comment #2
yesct commentedto decide what info we should include, we can look at where we have already decided what kind of info to put in overviews.. like
dashboard
issue search results
issue page
rocket ship
Comment #3
yesct commented1.
Based on that I would suggest:
Project
Title
Status
Priority
Category
all tags
---
2.
I think it would be ok to leave out the trimmed issue summary, but do not feel to strongly about that.
---
3.
Can we color for status?
Comment #4
damienmckennaWhy not just use metatag and assign some reasonable defaults for the appropriate content types?
Comment #5
yanniboi commentedI have had a look at metatag module on a vanilla drupal install.
It requires ctools and token module (which I would say is reasonable) and has a separate twitter cards sub-module with the relevant specific settings. It has a separate UI module which can be deactivated once sensible defaults per content type have been created and exported to code using ctools exportables. It uses tokens so most node information is accessible from the UI.
All in all, I think using this module is a good idea, and since the UI can be disabled it should not cause any problems once defaults are set.
I think new modules to d.o need performance review?
Comment #6
damienmckenna@yanniboi: A note of clarification: the UI submodule is an empty holdover from an alpha 3 years ago, it'll be removed post-1.0; the UI cannot be disabled, excluding by permissions.
Comment #7
damienmckennaShould we expand this to also cover other meta tags provided by the Metatag module?
Comment #8
drummFor performance, I expect this to load already statically cached items, so it wont have much of a performance impact, relatively. We should pay attention to make sure that is true.
For scope, don't expand it. Other issues can build on this later. If this expanded to include all meta tags, it may never get resolved.
Since the configuration is exportable, that should be done in the drupalorg module, either in Features, or however it works best.
What this does need is a 1.0 release. If there are any security problems, it is good to have the security tram process. And that would be a good general sign from the module maintainers that it is good to use on production sites.
Comment #9
yanniboi commentedOk, if the UI cannot be disabled, we just need to make sure regular users cannot override the defaults when posting/editing issues.
I agree with @drumm, @DamienMcKenna do you have a meta/blocker issue to get a full release?
Comment #10
yanniboi commentedNevermind, I found the Meta: #2175021: META: Plan for Metatag 7.x-1.0-rc1 release
Comment #11
yanniboi commentedInstalling metatag on drupal.org (dev site) is causing this error: #2019745: "Unknown taxonomy_term" or "Unknown node" - No way to create new default metatag
This will need to be fixed in the 7.x-1.0 release.
Comment #12
yanniboi commentedOK, good news, my personal dev domain was approved by twitter so I can post to twitter and see the resulting twitter cards.
I installed metatag on a drupal.org development clone, set the markup tags, copied the raw page source to my server and tweeted a link. The attached image is the resulting twitter card:
Comment #13
yesct commentedI think #12 is good enough for a start.
Now we just have to update the issue summary for next steps/remaining tasks (release, evaluate security, performance analysis?) and what might block this. (I'm a little confused about if the plan is to use meta tags, etc on d.o, so updating the issue summary would be great... or do we need more feedback first?)
I think when things need to get deployed on d.o there needs to be instructions in the issue summary also...
Comment #14
killes@www.drop.org commentedI don't want twitter to have any of the content I create, please make sure you take care of that.
Comment #15
yesct commented@killes I'm not sure what we can do. d.o has the content.
And individuals post links to twitter... which happens without this issue.
i dont think adding the meta tags to d.o gives the content to twitter, but I might not be understanding.
Comment #16
damienmckenna@killes: April fools? :p
For anyone checking in on this, adding Twitter Cards support will not notify Twitter that content has been posted, it only provides a way of customizing what is displayed when a d.o link is pasted into Twitter and someone views the tweet containing the link on either the website or one of the Twitter apps that supports nested meta data (the official app, etc); it's 90% identical to the Open Graph stuff that Facebook uses.
Comment #17
killes@www.drop.org commented@DaminMcKenna: not at all, but thanks for the explanation.
Comment #18
basic commentedComment #19
tvn commentedMetatag module was installed on Drupal.org yesterday for another issue. "Metatag: Twitter Cards" sub-module is not enabled yet. Whomever is interested in moving this further can request the fresh D.o dev site and work on configuration needed.
Comment #20
yanniboi commentedGreat! I'll take this one please! :)
Comment #21
tvn commentedThe dev site will be ready in ~1,5h. The url will be https://twitter-drupal.redesign.devdrupal.org/.
Comment #22
yanniboi commentedI have started to implement this on the dev site, however I cannot test this, because the http access authentication on the dev server prevents twitter from crawling the site.
How would the process of pushing this to drupal.org work anyway? Would the config go into a feature? Or would someone manually alter the metadata config?
Comment #23
damienmckenna@yanniboi: Per the documentation, the "twitter:creator:id" meta tag should be a numeric string, not the Twitter user name. I think it'd be useful to update the global settings, possibly via hook_metatag_export_default_alter(), rather than just the project_issue. Also, it might be worth setting "twitter:site".
Comment #24
drummThis project has a few features exported in the features directory. That is probably the best way to get the configuration deployed.
Comment #25
damienmckenna@YesCT: Thanks for pinging me.
Metatag 1.0-rc1 is out, so we should start looking at this.
We have the following meta tags at our disposal:
Other tags aren't relevant.
Comment #26
damienmckennaI've added a master issue to identify all "things" that need meta tags: #2402211: META: Add appropriate meta tags to drupal.org for all entities
Comment #27
tim.plunkett#2478807: Adjust metatag settings to include [node:title] in description and/or enable Metatag: Open Graph was opened as a short term solution
Comment #28
damienmckennaTo clarify: this issue is just for focusing on Twitter Cards meta tags for the project issue content type, #2402211: META: Add appropriate meta tags to drupal.org for all entities is an umbrella issue for going through each entity type and identifying the appropriate meta tags for each.
FYI I'll be around during DCLA week if anyone wants to sit down with me and work out some of these? Not sure I'll have time until then anyway ;)
Comment #29
tvn commentedHey Damien,
I'd love to work with you on this at DC LA, either at pre-sprint before Con or during the Friday code sprint. Let's do it!
Comment #30
wmostrey commentedIn the meantime the metatag module has been installed so I guess it's just a matter of configuration?