Solved

how to share a mp3 inline in facebook

Posted on 2010-08-31
8
753 Views
Last Modified: 2012-05-10


Hello,

I am trying to share a mp3 and allow people to send it via facebook using facebook share.

I am linking directly to a MP3 for the URL in my setup. The issue is my nginx server is returning the mp3 only.

So Facebook says here... The ideal way for you to connect video and media files to the share link is to make the URL in the link point to a Web page that contains the / tags described above (title, description, image_src) along with some additional / tags:

I have all the meta tags in place, and it reads my album title and artist name but not the remote MP3 URL the mp3 url getting passed is the current page the share button is on.

This is what my code looks like

    <meta name="title" content="page_title" />
    <meta name="description" content="audio_description" />
    <link rel="audio_src" href="http://audio.myhost.com/123.mp3" />
    <meta name="audio_type" content="audio/mpeg" />
    <meta name="audio_title" content="audio_title (eg. song name)" />
    <meta name="audio_artist" content="audio_artist_name" />
    <meta name="audio_album" content="audio_album_name" />

But the URL being passed is not audio.myhost.com/123.mp3 it is the local url that the page lives on.

What do I have to do to get the link to pass with the album name and artist?
0
Comment
Question by:CHINOS
  • 4
  • 4
8 Comments
 
LVL 82

Expert Comment

by:leakim971
ID: 33583097
Check section sharing rich media : http://developers.facebook.com/docs/share

it seems you miss Audio (required) :

< link rel="image_src" href="audio_image_src url (eg. album art)" / > 
0
 

Author Comment

by:CHINOS
ID: 33629714
Please excuse my delay in getting back to this, I have read the entire facebook share page carefully and I have added <meta name="medium" content="audio" /> but that has not solved the problem.  

Here is what I have...


        <!-- required -->

        <meta name="medium" content="audio" />

        <meta name="title" content="page_title" />

        <meta name="description" content="Some Content" />

        <link rel="image_src" href="http://mydomain.com/logo.jpg" />

        <link rel="audio_src" href="http://mydomain.com/song.mp3" />

        <meta name="audio_type" content="audio/mpeg" />



        <!-- optional -->

        <meta name="audio_title" content="audio_title (eg. song name)" />

        <meta name="audio_artist" content="audio_artist_name" />

        <meta name="audio_album" content="audio_album_name" />

Open in new window

0
 
LVL 82

Expert Comment

by:leakim971
ID: 33632581
Try this :


<!-- required -->
<meta name="medium" content="audio" />
<meta name="title" content="page_title" />
<meta name="description" content="Some Content" />
<link rel="image_src" type="image/jpeg" href="http://mydomain.com/logo.jpg" />
<link rel="audio_src" type="audio/mpeg" href="http://mydomain.com/song.mp3" />
<meta name="audio_type" content="audio/mpeg" />

<!-- optional -->
<meta name="audio_title" content="audio_title (eg. song name)" />
<meta name="audio_artist" content="audio_artist_name" />
<meta name="audio_album" content="audio_album_name" />

Open in new window

0
 

Author Comment

by:CHINOS
ID: 33637170
Ok, I tried that but it still won't work, my understanding is that whether or not this meta data is "on the page that the facebook share icon is on", it will not matter, because it is looking for the meta data on the page within a share_url link, unless of course the share_url is not defined in which case it's "supposed to" look on the current page that we're working with, however, it will not read the meta data.  

I'm trying to link directly to a mp3 and share that inline in facebook for an app I'm working on.  
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

Author Comment

by:CHINOS
ID: 33641844
Let me rephrase that, I have it working with the meta tags if I link to a html page which contains the meta tags.  I was confused because I was looking for the url in the share link but it turns out FB actually links to the html page and then that scans for the meta tag's audio_src.  

The problem I'm facing is, I need to link to several different mp3's dynamically, how then am I supposed to have meta data for each mp3 shared respectively?
0
 
LVL 82

Accepted Solution

by:
leakim971 earned 250 total points
ID: 33642838
>how then am I supposed to have meta data for each mp3 shared respectively?

I think. If possible use a playlist : http://www.youtube.com/watch?v=3AFiE9PcBig
0
 
LVL 82

Expert Comment

by:leakim971
ID: 33758188
Thanks for the points!
0
 

Author Comment

by:CHINOS
ID: 33758224
Sorry took me so long got distracted by another project
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Foreword (July, 2015) Since I first wrote this article, years ago, a great many more people have begun using the internet.  They are coming online from every part of the globe, learning, reading, shopping and spending money at an ever-increasing ra…
This article discusses four methods for overlaying images in a container on a web page
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

919 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now