Incorporating flower soundplayer into social tools

Colin Campbell

28 Oct, 2010 01:52 AM

Im trying to set up a page where people can tweet or like to stream our entire album. Setting up the twitter side was no problem, but the facebook side is not as easy, I can't get the sound player to appear. All i did was replace the link for the download with a "flower_soundplayer" div with links to the songs inside.

To do what you want you'll need some additional Javascript. What's happening is that the Twitter process requires a page refresh, so when the page loads flower finds your div and sets up the player. But with Facebook you swap in the content dynamically, so flower's already looked for any players it needs to set up.

You can do it it by dynamically injecting a player, or by scanning the injected content. Either way would work, but each would need some custom scripting...