SoundCloud API get number of plays in time period - soundcloud

Is there a way to get the number of plays for a track between time A and time B using the SoundCloud API?

No, there is no way to do that.

Related

How can I determine if a Soundcloud track is a preview (Soundcloud GO) based on its URL?

My app retrieves tracks from Soundcloud and plays them.
But since a few weeks, it seems that Soundcloud has changed the way it works; and now I often get "preview" tracks; so I can only listen to 30s.
I would like to invalidate those tracks in my app.
Is there a way to do this ?
It seems there is nothing in the URL that permits to recognize those tracks. Maybe I have to do an API call it.
I'm searching for the most basic solution possible.
Thanks !

Embed Facebook Live video comments on page

I am using Facebook Live inside of a web app to live stream videos. I am wondering if it is possible to include the live commenting associated with the video on my site in real time. I know I can grab the comments from the graph API, however this is not real time. The comment embed widget is also not real time and would need to be constantly refreshed.
The documentation says :
"You can read live video comments by polling the Live Video
Comments
edge."
What is polling? How do I do this and is it possible from a front end web app.
Basically my question is how do I include the live comments along with Facebook Live video on my own website.
This is now available via SSE streams
https://developers.facebook.com/docs/graph-api/server-sent-events/endpoints/live-comments
I know I can grab the comments from the graph API, however this is not real time.
This is as real time as it can get. If someone posts a comment and you immediately query the Graph API, you will see their comment.
What is polling?
As there is currently no streaming data endpoint for comments, you must query the comments on the live video repeatedly. That is, every 2 seconds or so, refresh the data.
This is done by making a Graph API GET request for /{video-id}/comments. I also suggest setting "order": "reverse_chronological" in the parameters so that you get the newest comments first.
You can see some sample code for doing this as part of the Live Comments Teleprompter: https://github.com/fbsamples/live-comments-teleprompter/blob/master/js/main.js#L89-L103

Soundcloud Limit on Play Requests

I'm new with SoundCloud API and want to verify something about the Rate Limit on Play Requests.
Is the /tracks/:id/stream limit of 15K per 24h is for playing videos via the html5-widget? does this mean I cannot play more than 15K songs per day? or i'm missing something..
These limits are applied to developer applications using the
SoundCloud API, and have no impact on the SoundCloud embedded player.
Soundcloud Backstage Blog
These API limits only apply when making API requests with your Client ID (JavaScript, Python, Ruby, or Objective-C SDKs). Because the HTML 5 Widget does not require an API key, these limits do not apply to that player.

Playlist not refreshed after adding a track via API

I'm trying to integrate Deezer with Slack. A user would be able to type !play Blackmill - Let It Be in Slack and via a webhook to Deezer API a track would be added to our room's playlist.
To add a track I post to http://api.deezer.com/playlist/123456789/tracks?songs=22945401, it returns true, and the track is actually added. But in the browser where the playlist is currently playing I don't get the new track until a page refresh, so the playlist just stops after the last track that was already there.
I know there's collaborative playlists which somehow work in a similar fashion, so I'm hoping it's possible to implement what I described.
Is there a way I can tell Deezer to refresh the playlist? Or maybe there's a better approach altogether?

How to get only playable songs in US?

I'm working on a spotify app with facebook api.
I have the following query.
me/music.listens?limit=5&util=1 week ago
or
[friend id]/music.listens?limit=5&util=1 week ago
when i get tracks from the above api, I get songs that're not playable in US. Is there a parameter or a way to get songs that are playable in US only?
No, you can retrieve a list of what the user listened to in any of the music apps, but unless you have some other agreement with the providers of the music (e.g. spotify, rdio) there's no way to know if some other user can listen to the same songs.
edit: based on iKenndac's answer, it seems there's a Spotify API to determine playability by region, but you can't get the info from Facebook's API
You can use the Spotify Web APIs to look up territory availability.