Version: 2.67.0

How to use?

This article explains how to use the Social Sharing API. This API renders visual components which allow viewers to share the content across different (social) media.

Code examples

Web SDK

The Social Sharing API is currently only available on the Web SDK.

player.social.url = "http://demo.theoplayer.com/social-sharing";
player.social.items = [
{
label: "Facebook",
icon:
"https://facebookbrand.com/wp-content/themes/fb-branding/prj-fb-branding/assets/images/fb-art.png",
src: "http://www.facebook.com/sharer/sharer.php?u=<URL/>"
},
{
label: "Twitter",
icon:
"https://s-media-cache-ak0.pinimg.com/originals/f3/6f/51/f36f511b261596a2debe85d844bb1b87.png",
src: "http://twitter.com/intent/tweet?url=<URL/>"
},
{
label: "Reddit",
icon:
"https://vignette3.wikia.nocookie.net/hayday/images/1/10/Reddit.png/revision/latest?cb=20160713122603",
src: "http://www.reddit.com/submit?url=<URL/>"
},
{
label: "Direct link",
src: "http://demo.theoplayer.com/social-sharing"
},
{
label: "Embed",
text:
'<iframe width="640" height="360" src="http://demo.theoplayer.com/social-sharing" frameborder="0" allowfullscreen>\n</iframe>'
}
];