music.listen returns an empty array

I'm working on a Spotify in-app application.

I like to know what my friends are listening. I'm currently using music.listen open graph api, but it returns an empty data for most of users.

I signed up a new facebook account then signed in Spotify using the new account. I clikced a song then logged out.

I then switched back my original account then I get data for the new facebook account (which is friend of my original account)

so my guess is that music.listen works for only new users (or recently signed up)?

Is this true?

Updated:

Here's what worked for me

  1. I signed up a new facebook account on my second computer
  2. Installed Spotify app then signed in with the new facebook account.
  3. Spotify prompted a message and I clicked continue
  4. I clicked a song and shared it to facebook.

  5. on my main computer, I signed into Spotify with a different facebook (friend of the new facebook account) then accessed my app. My app gets a list of songs that my new facebook account listened.

While using my new facebook, I didn't see a permission box.

So my question is...how come a new facebook works, but not existing accounts?

Answers


Do you definitely have the correct permissions? you'll need the user_actions.music or friends_actions.music permissions to read a user's list of music activity

For more information see https://developers.facebook.com/docs/authentication/permissions/ and https://developers.facebook.com/docs/authentication/

see https://developers.facebook.com/docs/authentication/permissions/#open_graph_perms specifically for music

It will then be accessible at /USER_ID/music.listens

Are you also sure that the users you're checking for actually use one of the social music apps and their activity in that app is visible to you?


Need Your Help

Functions inside functions, contexts and register_shutdown_function

php function variables scope nested

I have this code (Is more complex, but I limited it to some lines).

Is there logical loophole here?

logic computer-science boolean-logic

I need to execute a piece of code which is like this