Spotify integration with Facebook OpenGraph

I'm trying to reproduce some cool things of the Spotify opengraph integration but there is one thing I understand how they do :

when you go on your spotify app profile (mine : https://www.facebook.com/antonio.mendespinto/music) you can see that the musician links points to the facebook page and not the spotify web pages (http://open.spotify.com/artist/7CajNmpbOovFoOoasH2HaY). How do they do that.

Also, is it this that lets Facebook to do behind the scenes the nice box in the artists page https://www.facebook.com/ogp/464730384564/ on the top showing friends interactions with the artist and spotify friend interactions.

Everything seems to point to the facebook pages instead of the spotify pages. How do they do that?


Yes, Spotify uses Facebook Open Graph Music, a predefined set of objects and properties for music.

https://developers.facebook.com/docs/opengraph/music/

Then I guess the Spotify account is marked in a way that makes this available. It is possible that this is what makes Facebook show the nice box in the artist page.

I work at Spotify, but I am not really sure about all the details of this. I know other music streaming services also use this, but I am not sure if it still requires a special account. It did in the beginning. Spotify was one of the first users of Open Graph.


The destination of the links inside Open Graph artifacts are left to the discretion of the developer. Say you're writing an app that lets people share restaurant tips. When you post a "Tip" object to OG, you naturally would include a link to the restaurant. As the app developer, you could choose the restaurant's web page, its Yelp page, its OpenTable page, your own representation of the restaurant page on your web site or any other web page on the internets. :-)

Being faced with a similar situation, I chose to use my own application's web page representing a restaurant. I experimented with using the restaurant's Facebook page (which I had to look up using the Graph API for search) as well as a third-party provider of restaurant information, eg Yelp. Using the Facebook page, my app felt more tightly integrated with Facebook, but I didn't get the luxury of having my own Facebook app metadata. Because I chose to link to my own restaurant page, I was able to set and retrieve whatever metadata I wanted, which really came in handy later when I started configuring aggregations.

I don't know how Spotify data surfaces on artist pages nor do I know how they managed to shoehorn song AND album objects into each listen post on OpenGraph, eg: "Chris listened to Torn and Frayed on Exile on Main Street ." I could only ever get ONE object linked to an action, eg "Chris left a tip on California Pizza Kitchen ." My assumption is that since they were one of the (if not the only) Facebook Open Graph launch partner, they probably had some inside help.

链接地址: http://www.djcxy.com/p/55862.html

上一篇: 同时播放Spotify音乐和音频

下一篇: Spotify与Facebook OpenGraph整合