Posted on 11 January, 2010 By Kim Woodbridge 17 Comments

FBML – How to Add a MP3 to a Tab on Facebook Fan Page

 
Share

Music New Orleans style (by Brenda Anderson)

Last week I wrote an article how to add a flash or youtube video to a Facebook fan page tab using Static FBML.

Continuing this series, I am going to show how you can add a mp3 music file to your custom fan page tab. This would be a great way to add music for a fan page for musicians.

 

 

How to Do It

  1. You will need to add the Static FBML application and create a custom tab, if you haven’t already done so.
  2. Locate the music file URL. You need to have the file uploaded to your server in order to create the link to it. For example, the one I am using for testing purposes is located at http://kimwoodbridge.com/We Were Promised Jetpacks_01_It’s Thunder And It’s Lightning.mp3
  3. The music file must be an mp3. This does not work with .wav files.
  4. The fbml code used is:
    <fb:mp3 src="http://location/name of file.mp3" title="name of song"
    artist="name of band" album="title of album"/>
    
  5. Here are the parts of the code that you need to fill out:
    1. src= this is the location of the file on your server and the name of the mp3 file
    2. title= the name of the song
    3. artist= the name of the band or musician
    4. album= the name of the album
  6. My complete code looks like the following:
    <fb:mp3 src="http://kimwoodbridge.com/We Were Promised
    Jetpacks_01_It's Thunder And It's Lightning.mp3"
    title="It's Thunder And It's Lightning"
    artist="We Were Promised Jetpacks" album="These Four Walls"/>
    

I have not figured out a way to have a single instance of the music player rotate through a list of songs and I don’t think it can be done. You can, however, have multiple instances of the code on the page to have a listing of different songs. This works ok – the first player seems to start the song immediately but there was a delay when stopped it and started one of the subsequent songs. Again, I don’t know if that’s a bug with the code or just a Facebook quirk that I experience when testing this.

You can view this on the Video tab on the (Anti) Social Development fan page. I didn’t make a separate tab for it because I’m not a musician and won’t be posting music files. There are three instances of the player all with the same song. Of course, each player can have a different song – I only uploaded one file to my server.

Useful? Yes? No? Is there anything else you would like to learn how to do with FBML?

photo credit: Brenda Anderson


Related Posts:
  • How to Add a Custom Tab to a Facebook Fan Page
  • (Anti) Social Facebook Portfolio
  • How to Use FBML to Display Your Profile Photo on a Custom Facebook Fan Page
  • How to Create Your Own Facebook Share URL
  • (Anti) Social Lists 6/20/10
  • Posted In : Facebook
    If you enjoyed this post, please subscribe to my RSS Feed. You can also connect with my Facebook page or follow me on Twitter.



    17 Responses to “FBML – How to Add a MP3 to a Tab on Facebook Fan Page”

    Trackbacks/Pingbacks
    1. You are now listed on FAQPAL
    2. AlterNation Episode 3: Using the ‘Book for Business via @AlterImaging
    Leave a Comment
    You may use: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> .

    CommentLuv Enabled

    Recent Comments

      • Ari Herzog: Agreed on the updates/inbox snafu. I rarely see page updates and I know where they are! .-= Ari Herzog´s last blog .....
      • jayson: Kim, Love the themes. I am looking to update the theme on my site to something more appropriate. My site is all abou...
      • vered: "I wish more people would use this. I think it’s silly when I get updates for things occuring in Kansas and California –...
      • Dennis Edell @ Direct Sales Marketing: I was speaking generally, not specifically this month. how exactly do you work things? .-= Dennis Edell @ Direct Sales M...
      • Lucy Beer: Unfortunately I think next to no-one actually sees those "Updates". They're buried in a subsection of the inbox and I do...
      • Kim Woodbridge: Hi Marbella - Thanks! I had a great time....
      • Kim Woodbridge: Hi Julie - I'll probably try kayaking again next summer but I don't know if I will become much of a kayaker - I had a di...
      • Kim Woodbridge: Hi Vered - If you ever get the chance, you should go. It's like a different world - it's so quiet and peaceful....

    About

    Kim Woodbridge is an accomplished Information and Technical Consultant specializing in the entire implementation of a WordPress based website including installation, theme design, upgrades, unique customizations and ongoing site maintenance.

    Wordpress Services

    • Installation, upgrades and maintenance
    • Conversion of existing html and css templates
    • Theme and plugin recommendations
    • CSS customizations
    • Troubleshooting and tweaks for unique situations
    • Customization for individual blogging goals and needs
    • Training and advice