5

I'm trying to post a grooveshark url to facebook through facebook api but whenever i share, for example, http://grooveshark.com/#!/s/~/4C47F9 (through the api) i can't play it right there on facebook, i get redirected to the webpage with the music widget playing that music.
But if i copy-paste the above link to facebook i'm able to play the music right there on facebook.
What's wrong? I'm using the "url" field when posting.
Try it for yourselves.

I'm using the facebook api through an objective-c framework. the code is:

[variables setObject:@"hello there" forKey:@"message"]; 
[variables setObject:@"grooveshark.com/#!/s/~/4C47F9 " forKey:@"link"];
Somnath Muluk
  • 55,015
  • 38
  • 216
  • 226
Pedro Vieira
  • 3,330
  • 3
  • 41
  • 76
  • What do you mean by "copy-paste the above link to facebook" - paste where? – Gunnar Karlsson May 16 '12 at 05:05
  • Show your code which posts audio link on facebook. @Pedro Vieira – Somnath Muluk May 16 '12 at 09:13
  • @GunnarKarlsson wherever you want on facebook. the "what you're thinking" box. copy and paste the link and publish to it facebook through facebook. you can see the audio plugin and you're able to listen to the music right there. – Pedro Vieira May 16 '12 at 15:15
  • @SomnathMuluk i'm using the facebook api through an objective-c framework. the code is: [variables setObject:@"hello there" forKey:@"message"]; [variables setObject:@"http://grooveshark.com/#!/s/~/4C47F9 " forKey:@"link"]; – Pedro Vieira May 16 '12 at 15:17
  • Thanks for clarification. I'll try to find an explanation. – Gunnar Karlsson May 16 '12 at 15:33

4 Answers4

3

It works if you remove the #!:

use:

http://grooveshark.com/s/~/4C47F9

in steat of:

http://grooveshark.com/#!/s/~/4C47F9
Lutian
  • 31
  • 2
  • nop, still not sharing the music widget. just a normal link to redirect the user to grooveshark... but thanks anyway! – Pedro Vieira Sep 02 '12 at 19:01
1

These are the meta facebook tags that I used to share a grooveshark song on facebook:

<meta property="og:image" content="URL TO YOUR IMAGE" />
<meta property="og:video" content="https://grooveshark.com/facebookWidget.swf?songID=35018928" />
<meta property="og:video:width" content="200(FOR EXAMPLE)" />
<meta property="og:video:height" content="200(FOR EXAMPLE)" />
<meta property="og:video:type" content="application/x-shockwave-flash" />

That URL from grooveshark (with the facebookWidget.swf) will allow you to embed the grooveshark song alonside a custom link and title. As of March 26th, 2013 this works!

Hope this helps!

aponcol
  • 51
  • 4
0

It's possible the reason is not directly programming-related. This article, named "Facebook breaks up with GrooveShark", states that:

it’s still possible to share Grooveshark songs to Facebook manually [...]. Other than that, Grooveshark appears to have been locked out entirely from the world’s most popular social network.

The article outlines the deterioration of Facebook business relationship with Grooveshark, and how Facebook has recently deleted Grooveshark features from its site.

Gunnar Karlsson
  • 28,350
  • 10
  • 68
  • 71
  • but it doesnt make sense. i can share the link on facebook and the music widget is created. when i share through api just a simple link is shared, and when i click the link i get redirected to the grooveshark page to listen to it – Pedro Vieira May 17 '12 at 17:33
  • I've searched the Facebook developer pages for discussions and bugs related to the question but no luck. Only this Spotify link issue which isn't directly related:https://developers.facebook.com/bugs/200102986773102 – Gunnar Karlsson May 17 '12 at 23:49
0

you can use tiny song APi http://tinysong.com/api, it provides grooveshark song url that you can share using facebook api

Nixit Patel
  • 4,435
  • 5
  • 30
  • 57