Here is an example of socialising a video player with Facebook’s social plugins. In this example, I’ve integrated the BBC News Player with the Facebook Like and Comment plugins.
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
<html> | |
<head> | |
<title>BBC News - Like Button - Comments</title> | |
</head> | |
<body> | |
<!-- | |
Code by: Niraj Shah - www.webniraj.com | |
--> | |
<!-- BBC Player --> | |
<object type="application/x-shockwave-flash" id="embeddedPlayer_10318089" data="http://emp.bbci.co.uk/emp/releases/worldwide/revisions/749603_749269_749444_5/749603_749269_749444_5_emp.swf" width="640" height="360" style="visibility: visible; "><param name="quality" value="high"><param name="wmode" value="default"><param name="allowFullScreen" value="true"><param name="allowScriptAccess" value="always"><param name="flashvars" value="embedReferer=http%3A%2F%2Fwww.bbc.co.uk%2Fsearch%2Fnews%2F%3Fq%3Dlive%20news&embedPageUrl=http%3A%2F%2Fwww.bbc.co.uk%2Fnews%2F10318089&uxHighlightColour=0xff0000&domId=emp-10318089-54583&enable3G=true&playlist=http%3A%2F%2Fplaylists.bbc.co.uk%2Fnews%2F10318089A%2Fplaylist.sxml&config=http%3A%2F%2Fwww.bbc.co.uk%2Fplayer%2Femp%2F2_0_55%2Fconfig%2Fdefault.xml&fmtjDocURI=%2Fnews%2F10318089&config_settings_showShareButton=true&config_settings_autoPlay=true&config_settings_showPopoutButton=true&config_plugin_fmtjLiveStats_pageType=eav1&config_plugin_fmtjLiveStats_edition=Domestic&config_settings_showUpdatedInFooter=false&holdingImage=http%3A%2F%2Fnews.bbcimg.co.uk%2Fmedia%2Fimages%2F48351000%2Fgif%2F_48351569_640x360-news.gif&mediatorHref=http%3A%2F%2Fopen.live.bbc.co.uk%2Fmediaselector%2F5%2Fselect%2Fversion%2F2.0%2Fmediaset%2Fjournalism-pc%2Fvpid%2F%7Bid%7D"></object> | |
<!-- Facebook JavaScript SDK --> | |
<div id="fb-root"></div><script src="http://connect.facebook.net/en_US/all.js#appId=224597957564170&xfbml=1"></script> | |
<!-- Facebook Like Button --> | |
<div style="margin-top: 10px;"> | |
<fb:like href="http://www.bbc.co.uk/news/" send="true" width="640" show_faces="true" font=""></fb:like> | |
</div> | |
<!-- Facebook Comments Plugin --> | |
<fb:live-stream event_app_id="77626808659" width="640" height="500" xid="" via_url="http://www.bbc.co.uk/news" always_post_to_friends="true"></fb:live-stream> | |
</body> | |
</html> |
90% of the code was created by copy-and-pasting code from elsewhere, for example, Facebook provides the code for the JavaScript SDK and Social Plugins. The BBC Player code was also copy-and-pasted. The only code that needs to be hand written is the structure and styling for the page.
Facebook, Facebook Social Plugins, Flash