Solved

how to share a mp3 inline in facebook

Posted on 2010-08-31
8
752 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

 

Author Comment

by:CHINOS
Comment Utility
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
Comment Utility
>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
Comment Utility
Thanks for the points!
0
 

Author Comment

by:CHINOS
Comment Utility
Sorry took me so long got distracted by another project
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

I imagine that there are some, like me, who require a way of getting currency exchange rates for implementation in web project from time to time, so I thought I would share a solution that I have developed for this purpose. It turns out that Yaho…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
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…

744 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

17 Experts available now in Live!

Get 1:1 Help Now