Solved

how to share a mp3 inline in facebook

Posted on 2010-08-31
8
758 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
The Ultimate Checklist to Optimize Your Website

Websites are getting bigger and complicated by the day. Video, images, custom fonts are all great for showcasing your product/service. But the price to pay in terms of reduced page load times and ultimately, decreased sales, can lead to some difficult decisions about what to cut.

 

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

Why Off-Site Backups Are The Only Way To Go

You are probably backing up your data—but how and where? Ransomware is on the rise and there are variants that specifically target backups. Read on to discover why off-site is the way to go.

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…
This article discusses four methods for overlaying images in a container on a web page
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

688 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