Two days ago i was making a website which demands, that a song is to be publish on Facebook, the requirement is this that song must be played on the Facebook profile rather just to place a link on it. I (as usual) Google and try to find a solution or a tutorial that fit the bill but i did not find any, then I start reading the Facebook api page for sharing (that i bookmarked, though i do want to "read" that:) ), to my luck that was amazing and simple.
There is a very simple way to doing this you have just to put 4 meta tags in the head of the page and your done... simple isn't ?
There is a very simple way to doing this you have just to put 4 meta tags in the head of the page and your done... simple isn't ?
<meta proprery="og:title" content="page title" /> <meta proprery="og:description" content="audio description" /> <meta property="og:image" content="audio image url (eg. album art)" /> <meta property="og:audio" content="audio url (.mp3 only)" />
AND
add a facebook share button of course.Facebook Share <script src='http://static.ak.fbcdn.net/connect.php/js/FB.Share' type='text/javascript'></script>and you are good to go... if you want to see it in action visit musicjinni.com and listen any song or video and share it on facebok and see for yourself ...
2 comments:
og:image doesn't work for me with og:audio.
Any help?
image will appear only when your site is not approved by Facebook, once approved a player will appeared.
Post a Comment