Share audio on Facebook using Open Graph


Manish Kumar

I'm trying to share audio content on facebook using the og tag so that the audio can only be played in the facebook window.

Here is the code I wrote:

<html>
<head>
<meta property="og:url" content="https://www.songdew.com/test_manish.html"/>
  <meta property="og:image" content="https://s3-ap-southeast-1.amazonaws.com/sgmedia/13122/photos/t_ce0284c1ad98c8e79c3f3af7b8c297.jpg"/>
  <meta property="fb:app_id" content="335931163095578"/>
  <meta property="og:title" content="3. undead redemption" />
<link rel="canonical" href="https://www.songdew.com/test_manish.html"/>
<meta property="og:audio" content="https://s3-ap-southeast-1.amazonaws.com/sgmedia/18037/tracks/f7a43fcd2f8a15a0a1322bf3ac2429.mp3">
<!--<meta property="og:audio:title" content="manish23">
<meta property="og:audio:artist" content="Mkumar">
<meta property="og:audio:album" content="itsnew">  -->
<meta property="og:audio:type" content="application/mp3">
</head>

<title>This is test</title>

<style type="text/css">

#share-buttons img {
width: 35px;
padding: 5px;
border: 0;
box-shadow: 0;
display: inline;
}

</style>
<body>Thiis is a test Page


</body>

</html>

However, the audio doesn't play there. I don't get a problem with this code. Any help is appreciated!

Crowe

You can't share audio tracks in such a way that they play immediately inline.

As https://developers.facebook.com/docs/opengraph/music clearly points out at the top of the page, this time only for a few whitelisted Facebook partners.

A possible alternative is to embed it as a video (Flash and/or mp4). Whether you make the video just play the audio, or make the visual content black or something, or use the video to convey additional information about the audio track (like who the artist is, maybe the cover art, etc.) you.

Related


Facebook Open Graph and custom share buttons

Karen I've been making a Joomla website with a custom template and had to create some custom share buttons for Google+, Email, Twitter and Facebook. The first three work fine, but the Facebook one is causing problems. I'm using K2 and have all the "open graph"

Facebook comments rejected for using open graph photos

Ravi Prakash I'm developing an app in iOS that uses Facebook login. Users can access Facebook photos within the app. When I submitted the emulator version to the review team, it was rejected for the following reasons: Your Facebook login doesn't recognize my t

Facebook Open Graph refresh

Philip Ingram I used a debugger -> https://developers.facebook.com/tools/debug/og/object/ which shows the correct image and marker line for my domain when showing the initial existing scrape . It also displays correctly when I get new crawl information. Howeve

Open Graph Data Facebook

paris 0000 I have a problem with the headers in the Facebook debugger! After opening the html page, the static title is ex. stack overflow. After 2-3 seconds I get the data from the json and change the title to www.stackoverflow.com $(document).prop('title', '

Facebook Open Graph refresh

Philip Ingram I used a debugger -> https://developers.facebook.com/tools/debug/og/object/ which shows the correct image and marker line for my domain when showing the initial existing scrape . It also displays correctly when I get new crawl information. Howeve

Open Graph Data Facebook

paris 0000 I have a problem with the headers in the Facebook debugger! After opening the html page, the static title is ex. stack overflow. After 2-3 seconds I get the data from the json and change the title to www.stackoverflow.com $(document).prop('title', '

Facebook Share Video Graph API

microphone I am trying to share a video url from my device to facebook. For this I use the following code: GraphRequest request = null; try { request = GraphRequest.newPostRequest( token,

Share with hashtags via open graph

Nick Rhodes I'm implementing share buttons for different social networks (eg VK, Facebook, Twitter, OK) and I'm using Open Graph to set a property of the post that will appear on the user's social network page. I want to add a hash tag to the shared post so th

Share with hashtags via open graph

Nick Rhodes I'm implementing share buttons for different social networks (eg VK, Facebook, Twitter, OK) and I'm using Open Graph to set a property of the post that will appear on the user's social network page. I want to add a hash tag to the shared post so th

Share with hashtags via open graph

Nick Rhodes I'm implementing share buttons for different social networks (eg VK, Facebook, Twitter, OK) and I'm using Open Graph to set a property of the post that will appear on the user's social network page. I want to add a hash tag to the shared post so th

iOS Facebook post using Open Graph fails - error code 102

Nilav Butt I am using this example to post my story to facebook. I have my own Open Graph objects, but stories. This works fine when I'm already logged into the iPhone's native FB app. This login is the one that manages my FB app. I have verified everything in

facebook open graph count sharing using php sdk

David Tadei From the Facebook documentation, I can get the share count of the page calling the following URL https://graph.facebook.com/?id=http://www.google.it , and the data returned is as follows: { "share": { "comment_count": 0, "share_count

Create photo albums with Facebook SDK on iOS using Open Graph

Ben Williams I need to create new albums using Facebook SDK on iOS. My code is working, but recently it started returning errors like this: { "com.facebook.sdk:ErrorSessionKey" = "<FBSession: 0x7290850, state: FBSessionStateOpenTokenExtended, loginHandler:

iOS Facebook post using Open Graph fails - error code 102

Nilav Butt I am using this example to post my story to facebook. I have my own Open Graph objects, but stories. This works fine when I'm already logged into the iPhone's native FB app. This login is the one that manages my FB app. I have verified everything in

How to like Url in Android using Facebook SDK's Open Graph

owl I'm developing an application in Android that can be like Url. Please provide an example step by step to like a URL using Facebook SDK's Open Graph. Facebook provides the following source code, but I don't know how to use it properly. Bundle params = new B

Facebook API: FQL query using Open Graph API

doku87 How to use Open Graph API to make FQL query like below? "Choose name from page contains location ("music/band")" More specifically, I'm looking for a way to get all Facebook pages of a specific category. Lucien Can't get pages by category, can only sear

iOS Facebook post using Open Graph fails - error code 102

Nilav Butt I am using this example to post my story to facebook. I have my own Open Graph objects, but stories. This works fine when I'm already logged into the iPhone's native FB app. This login is the one that manages my FB app. I have verified everything in

iOS Facebook post using Open Graph fails - error code 102

Nilav Butt I am using this example to post my story to facebook. I have my own Open Graph objects, but stories. This works fine when I'm already logged into the iPhone's native FB app. This login is the one that manages my FB app. I have verified everything in

How to like Url in Android using Facebook SDK's Open Graph

owl I'm developing an application in Android that can be like Url. Please provide an example step by step to like a URL using Facebook SDK's Open Graph. Facebook provides the following source code, but I don't know how to use it properly. Bundle params = new B

Open Facebook page to share images

Chanover Said To open a Facebook page from another app, we use an intent, passing the "fb://page/" uri as the ACTION_VIEW intent. But what if I want to send an image at the same time, like ACTION_SEND, but only to the Facebook app? I realize this would be an i

Open Facebook page to share images

Chanover Said To open a Facebook page from another app, we use an intent, passing the "fb://page/" uri as the ACTION_VIEW intent. But what if I want to send an image at the same time, like ACTION_SEND, but only to the Facebook app? I realize this would be an i

Facebook Share session not open error

dancingbush I am using the Facebook SDK to upload data from a app to the users Facebook wall. I have implemented code to allow a user to share data via a dialog box or if user has no android FB app to post directly on wall, went through tutorial https://develo

Open link on Facebook to share photo

Yatindra Jain When sharing the post on Facebook, it says "Passed CollegeParrot a few seconds ago", great! We would like to hyperlink the "College Parrot" section of this statement to our Facebook page https://www.facebook.com/CollegeParrot Jason Obviously you