Created
June 24, 2015 08:23
-
-
Save mahemoff/0554586855b9b3b4fa21 to your computer and use it in GitHub Desktop.
Twitter card meta tags
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%meta(name="twitter:card" content="player") | |
%meta(name="twitter:title" content="#{@episode.safe_title} by #{@series.safe_title}") | |
%meta(name="twitter:app:name:googleplay" content="Player FM") | |
%meta(name="twitter:app:id:googleplay" content="fm.player") | |
%meta(name="twitter:description" content="#{@episode.safe_description}") | |
%meta(name="twitter:site" content="PlayerFM") | |
%meta(name="twitter:image" content="#{safe_series_image_url @episode.series}") | |
-# dev tunnel -> %meta(name="twitter:player" content="https://something-something.ngrok.com#{widget_episode_path series_id: @series.slug, id: @episode.slug}" | |
) | |
%meta(name="twitter:player" content="#{Player.routes.base_url}#{widget_episode_path series_id: @series.slug, id: @episode.slug}") | |
%meta(name="twitter:player:width" content="435") | |
%meta(name="twitter:player:height" content="200") | |
%meta(name="twitter:player:stream" content="#{@episode.url}") | |
%meta(name="twitter:player:stream:content_type" content="audio/mpeg") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is what you put on the website's regular page for an episode. When a tweet links to this page, Twitter will scrape the page to show the card. The most important tag here is "twitter:player" - its "content" attribute points to the card content, which is a miniature, self-contained, HTML page that will be rendered inside Twitter.