How to add a soundcloud track to twitter player card?



Are there any good examples of adding a soundcloud track as a twitter card. There seem to be lots of video examples about but no audio ones.

I would use the same format as video but I’m guessing it will fail because there would be no twitter:image tag unless it is possible to grab the track image from soundcloud as you would with a youtube video thumb? Also I’d like to know which url to use from soundcloud. This is what I have so far:

<meta name="twitter:card" content="player">
<meta name="twitter:title" content="Test Audio">
<meta name="twitter:description" content="Test audio for Twitter Cards.">
<meta name="twitter:site" content="@thinkDIF_">
<meta name="twitter:player" content="">
<meta name="twitter:player" content="">
<meta name="twitter:player" content="">
<meta name="twitter:player:width" content="500">
<meta name="twitter:player:height" content="166">
<meta name="twitter:image" content="?????">


If you Tweet a Soundcloud link, it should render the custom Soundcloud audio player. So there’s no need to implement your own player card, as such.


Thanks for the reply @andypiper

This is for sharing a Soundcloud clip that is embedded in a separate entry page so in effect the link we would be sharing is to the page the clip is embedded in rather than a direct link to the Soundcloud link. So we are looking to use Twitter Cards to provide twitter with the link to the audio clip as well.


I think that in order for that to work you’d need to be able to point at the raw stream, since their player is not directly embeddable in a Twitter card.


Ok cheers I should be able to sort that out. What do you suggest for the required twitter:image card? I haven’t found anything on soundcloud to be able to use the artwork similar to a YouTube image link? Is it a case of using a default image for all sound clips?


This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.