Solved

how to share a mp3 inline in facebook

Posted on 2010-08-31
8
754 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
Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

 

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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Part of the Global Positioning System A geocode (https://developers.google.com/maps/documentation/geocoding/) is the major subset of a GPS coordinate (http://en.wikipedia.org/wiki/Global_Positioning_System), the other parts being the altitude and t…
This article discusses four methods for overlaying images in a container on a web page
The viewer will learn how to count occurrences of each item in an array.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

777 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