This topic explains how Brightcove's Twitter integration allows you to embed videos in a tweet via Twitter Player Cards.
Embedding video in a tweet
Twitter allows embedding of videos in a tweet via Twitter Player Cards. Video Cloud is integrated with Twitter in such a way as to make this seamless for you. Simply share the video to Twitter, using the social sharing tools built into the player, and your video will be embedded in the tweet automatically.
Using Twitter Player Cards without the Video Cloud sharing tools
If you use your own social sharing tools embedded in the page instead of the ones provided in the Video Cloud player, you can still use a Twitter Player Card to embed the video in a tweet. To do that, you have to use a secure link to the player and add some meta tags to the page, similar to those used for Facebook embedding.
Including a secure link to the player
For Twitter to accept the player card, the link to the player must be secure (https rather than http), and some additional parameters must be added to the URL: &secureConnections=true&autoStart=false&height=100%25
&width=100%25
For example, in Video Cloud Studio we provide a URL like: http://bcove.me/mossj4gt
which redirects to http://link.brightcove.com/services/player/bcpid1834342175001?bckey=AQ~~,AAABOESUAnk~,6PrOG9qlKMQSd7Q0M4Knl7rtGc27-97E&bctid=1341852782001
In the twitter:player tag you would put: https://link.brightcove.com/services/player/bcpid1834342175001?bckey=AQ~~,AAABOESUAnk~,6PrOG9qlKMQSd7Q0M4Knl7rtGc27-97E&bctid=1341852782001&secureConnections=true
&autoStart=false
&height=100%25>&width=100%25
Twitter meta tags
You also need to include some Twitter-specific meta tags in the page:
Name | Content |
---|---|
twitter:width | width of the player |
twitter:height | height of the player |
twitter:title | the video title |
twitter:image | URL for a thumbnail image |
twitter:description | short description of the video |
twitter:card | player |
twitter:player | secure URL for the player |
Here are some sample twitter meta tags:
<meta name="twitter:width" content="480" /> <meta name="twitter:title" content="Sample Video" /> <meta name="twitter:height" content="270" /> <meta name="twitter:image" content="http://brightcove.vo.llnwd.net/e1/pd/96980657001/96980657001_207574837001_commonRedpoll-still.jpg?pubId=96980657001" /> <meta name="twitter:description" content="The short description can be used to give more information about your video and will appear in many standard Brightcove player templates." /> <meta name="twitter:card" content="player" /> <meta name="twitter:player" content="https://link.brightcove.com/services/player/bcpid1341739272001?bckey=AQ~~,AAABOESUAnk~,6PrOG9qlKMSBXdj3gV9otsZuA0wsvlt6&bctid=1341852782001&secureConnections=true&autoStart=false&height=100%25&width=100%25" />
Limitations
- Twitter player cards only accept MP4 (h.264) video; if your video is in FLV format, it will not be embedded in the tweet.