Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

how to share a mp3 inline in facebook

Posted on 2010-08-31
8
Medium Priority
?
768 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

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
 

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 1000 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

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
The viewer will learn how to count occurrences of each item in an array.
Suggested Courses

610 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