Last modified: 2014-03-20 17:45:26 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T45436, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 43436 - Implement Twitter Cards (<meta*> tags with content's metadata)
Implement Twitter Cards (<meta*> tags with content's metadata)
Status: RESOLVED FIXED
Product: MediaWiki extensions
Classification: Unclassified
TwitterCards (Other open bugs)
unspecified
All All
: Normal enhancement (vote)
: ---
Assigned To: Harsh Kothari
https://dev.twitter.com/docs/cards
: design
Depends on:
Blocks: commons 54829 61487
  Show dependency treegraph
 
Reported: 2012-12-26 20:21 UTC by Dereckson
Modified: 2014-03-20 17:45 UTC (History)
23 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Dereckson 2012-12-26 20:21:50 UTC
Suggestion received on wikitech-l from [[User:Mono]]:

"Could we add support for Twitter cards in Wikimedia projects? It wouldn't
be hard to do and would would be really nice for articles, images, videos -
everything linked from Wikimedia on Twitter could have a nice little
preview on Twitter.

The documentation is at https://dev.twitter.com/docs/cards - basically it
involves adding some meta tags around existing content server-side."

* * *

From the Twitter API documentation:

"Twitter cards make it possible for you to attach media experiences to Tweets that link to your content. Simply add a few lines of HTML to your webpages, and users who Tweet links to your content will have a "card" added to the Tweet that’s visible to all of their followers."

* * *

Design feedback would be welcome, to test something first on Wikimedia Commons for media files.
Comment 1 Brandon Harris 2012-12-26 20:27:31 UTC
One thing that will require caution - especially with "carding" photos from commons - is including attribution if a photo is CC-BY-SA (and, well, generally respecting the license of the image).
Comment 2 Brion Vibber 2012-12-26 20:30:24 UTC
See also bug 25854 (oEmbed) and bug 31338 (Facebook) for similar data export methods.
Comment 3 billinghurst 2012-12-26 22:05:32 UTC
I can see that the Wikisources could utilise something like this for completed texts.  We already have formalised headers with embedded/extractable metadata, and with transcluded works then an image copy of a djvu file at Commons (would need the ability to therefore select one image page from many in a file).

I would think that the WS community would like to be considered to participate for its structured and specific needs. [says he who isn't fully twitter competent]
Comment 4 Dereckson 2012-12-27 00:05:36 UTC
[ Adding Tpt as CC for more Wikisource idea and feedback. ]
Comment 5 John Mark Vandenberg 2012-12-27 00:43:23 UTC
Wikimedia Commons also has structured title and description.  On Wikimedia Commons it would be a nice touch to link photos to twitter handles.  i.e. allow the media uploader to record their twitter handle (on their userpage) and cause their photo uploads to have 'twitter:creator' or 'twitter:creator:id' filled in correctly.
Comment 6 Monomium 2012-12-27 03:17:48 UTC
One more thing: Twitter cards need to be approved by Twitter. This isn't hard once the format is recognized, but the Foundation should probably submit the request. See https://dev.twitter.com/docs/cards for details.
Comment 7 Tpt 2012-12-27 11:10:49 UTC
I believe that the most important issue to solve before creating such API for images is that we don't have any system integrated into MediaWiki to extract metadata about an image (creator, description and license).  If this issue is solve, I believe it would be very easy to add such API (oEmbed, Open Graph and Twitter cards) to MediaWiki.
Comment 8 Dereckson 2012-12-27 15:04:55 UTC
(In reply to comment #7)
> I believe that the most important issue to solve before creating such API for
> images is that we don't have any system integrated into MediaWiki to extract
> metadata about an image (creator, description and license).

That remembers me on a side note Esby (adding him as cc) wanted a better way to provide EXIF metadata.

With all these needs, I think we seriously need to improve API methods tailored to media files needs.

The workflow would be:
(1) Read EXIF metadata + standard description templates
(2) Provide a consistent set of metadata
(3) Implement stuff like oEmbed / Twitter Cards / Open Graph with this information
Comment 9 Tpt 2012-12-28 18:43:24 UTC
For the reading of description template, I believe it should not be done by parsing the wikitext but by a parser function that store these metadata into page_props table and override EXIF metadata in order to make the extension works with all templates (information, artwork, book...) and allow queries on this metadata.
This will allow, by example, to get easily all the file with CC BY-SA 3.0 license.

I see 3 important metadata:
- the creator of the content. This can be a Commons user for things like photos or an other person for things like paintings or books. We can imagine to store in this field, if it is possible, only a link to an user page or a creator page. This will allow to get easily, by example, the twitter account set in user preferences.
- the id of the license of the work like "CC BY-SA 3.0".
- the description of the file.
Comment 10 Jean-Fred 2013-01-02 18:14:25 UTC
(In reply to comment #7)
> we don't have any system integrated into MediaWiki to extract
> metadata about an image (creator, description and license).

Other people might not be aware of it: though it is not integrated into MediaWiki, we do have 
<https://commons.wikimedia.org/wiki/Commons:Machine-readable_data>
Comment 11 Dereckson 2013-01-02 20:51:55 UTC
Assigning this bug to Harsh Kothari, who volunteered to take this project.
Comment 12 Siebrand Mazeland 2013-01-12 18:37:21 UTC
There is a repo now without code. Is there any code yet? If so, please start submitting code. Otherwise I just might push some scaffolding...
Comment 13 Harsh Kothari 2013-01-12 18:40:22 UTC
I have made some code and pushing that code into repository.
Comment 14 Dereckson 2013-01-12 20:41:41 UTC
(In reply to comment #12)
> There is a repo now without code. Is there any code yet? If so, please start
> submitting code. Otherwise I just might push some scaffolding...
The code is currently the extension bootstrap and is located at https://github.com/harshkothari410/TwitterCards.
Comment 15 Monomium 2013-04-04 00:17:41 UTC
Any progress on this?
Comment 16 Dereckson 2013-04-04 09:33:16 UTC
(In reply to comment #15)
> Any progress on this?
Yes, you can follow code progress at the following Git repository URL:
https://gerrit.wikimedia.org/r/gitweb?p=mediawiki/extensions/TwitterCards.git;a=summary

Current state is read some Commons image data and write the relevant OG/Twitter metadata.

If you wish to adapt the code for your own wiki, this is ready to tweak it for your own wiki content.

If you wish to see it tested on Wikimedia wikis, there is still some progress needed (for example, to get licenses, and for Wikinews/Wikisource content).
Comment 17 Quim Gil 2013-09-26 20:59:03 UTC
fwiw https://www.mediawiki.org/wiki/Extension:TwitterCards also exists (it's the same project that Harsh started).
Comment 18 Jared Zimmerman (WMF) 2013-09-27 19:22:40 UTC
Is there a lab instance that this can be tested yet?

Also does it make sense to tie this to 

https://bugzilla.wikimedia.org/show_bug.cgi?id=49859 

and 

https://bugzilla.wikimedia.org/show_bug.cgi?id=25854

?
Comment 19 Andre Klapper 2014-01-21 13:21:12 UTC
Harsh:  I wonder what is missing here to close this as FIXED or WORKSFORME. 
Does the TwitterCards extension basically work? 
If so, this ticket should be closed and both potential deployment on WMF
servers and followup bug reports should be handled in separate tickets.
Comment 20 Andre Klapper 2014-02-18 13:16:30 UTC
Harsh:  I wonder what is missing here to close this as FIXED or WORKSFORME. 
Does the TwitterCards extension basically work? 
If so, this ticket should be closed and both potential deployment on WMF
servers and followup bug reports should be handled in separate tickets.
Comment 21 Harsh Kothari 2014-02-18 13:26:18 UTC
Yes. Basic work is done. We can close this ticket.
Comment 22 Jean-Fred 2014-02-18 13:33:39 UTC
> If so, this ticket should be closed and both potential deployment on WMF
> servers and followup bug reports should be handled in separate tickets.


Opened [[bug:61487]] to keep track of this on the Wikimedia Commons use case.
Comment 23 Andre Klapper 2014-02-18 21:47:18 UTC
(In reply to Harsh Kothari from comment #21)
> Yes. Basic work is done. We can close this ticket.

Thanks!

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links