Spotify playlists can be shared in two ways:
- Copy link to artist
- Copy embed code
as seen here:
Adding this playlist to a SAM is done by using the iFrame Block:
The iFrame Block allows for a URL link to be added, then rendered:
In some cases, a link may not render at all. This Help Article addresses a few of those common issues and how to resolve them.
For a Spotify Playlist to properly render in a SAM, be sure to use the Share/Copy Embed code:
The embed code needs to be edited before inserting it into the URL field of the iFrame Block. For example, the following is the embed code for The Beatles:
<iframe src="https://open.spotify.com/embed/artist/3WrFJ7ztbogyGnTHbHJFl2" width="300" height="380" frameborder="0" allowtransparency="true" allow="encrypted-media"></iframe>
Only the bolded section of the embed code is used in the iFrame Block:
<iframe src="https://open.spotify.com/embed/artist/3WrFJ7ztbogyGnTHbHJFl2" width="300" height="380" frameborder="0" allowtransparency="true" allow="encrypted-media"></iframe>
Resulting in the folllowing link that gets inserted into the block:
https://open.spotify.com/embed/artist/3WrFJ7ztbogyGnTHbHJFl2
Resulting in the playlist bow available in the SAM with each of the songs playable. With the SAM Block structure, other items can be added to the SAM, such as images, video, or text. This SAM has both an image block and the iFrame block with the Spotify Playlist as it will appear when the SAM is opened:
Comments
0 comments
Please sign in to leave a comment.