Soundcloud user favorites endpoint removed? - soundcloud

I have been using the Soundcloud favorites endpoint api.soundcloud.com/users/${USER_ID}/favorites for the past few months and since yesterday it has been returning 404 with username in ID field or a max of 35 tracks with no next_href returned in the response.
For example a request with "domdolla" in USER_ID field will return 404,
https://api.soundcloud.com/users/domdolla/favorites?linked_partitioning=1&offset=0&limit=200&client_id=XXXXXXXXXX
and a request with domdolla's user_id "627109" returns a collection of 32 tracks and no next_href.
https://api.soundcloud.com/users/627109/favorites?linked_partitioning=1&offset=0&limit=200&client_id=XXXXXXXXXX
However, if you retrieve domdolla's profile, it shows that he has 1082 public_favorites_count:
https://api.soundcloud.com/users/domdolla?client_id=XXXXXXXXXX
This endpoint is still documented in the Soundcloud HTTP API Reference here:
https://developers.soundcloud.com/docs/api/reference#users

They changed the API without updating the Docs.
The new endpoint is:
https://api-v2.soundcloud.com/users/{ID}/track_likes
This returns a list of "Likes".
The new api-v2 also already works with the resolve endpoint.

Related

Facebook Graph Api - leadgen_form endpoint (v12) not filtering

I am trying to filter the response from the leadgen_form endpoint but it is giving me the message:
(#100) Filtering field 'leads_count' with operation 'greater_than' is not supported
The request I am making is:
/v12.0/{page-id}/leadgen_forms?fields=id,created_time,name,status,leads_count,expired_leads_count&filtering=[{'field':'leads_count','operator':'GREATER_THAN','value':0}]
Is it really not possible to filter on this simple integer property or am I doing something wrong?
Second question I have, is the leadgen_forms endpoint still supported? On a topic on the Facebook Developers portal it is mentioned to be deprecated since V5.0(?). But the endpoint is still there in V12.0. See https://developers.facebook.com/support/bugs/630926654372206/?join_id=f3d05695fb730c

How to call nested apis in Springboot

Assume we have an api - /student/getStudentDetails/{id} which returns a JSON response containing the succeeding internal rest api (/student/getAdvancedStudentDetails/{id}).
{
id:123,
name:Alex,
nextapi:/student/getAdvancedStudentDetails/123
}
Here when we get the response from first api - /student/getStudentDetails, we need to process the JSON response and take out the second api from the first api and call it.
Any suggestions?
Your first response for first api "GET student details" only returns high level details of student and one of field "nextapi" in response has URL to GET more details about student.
In Your first response "nextapi" is customer field defined by you and it only has
URL without host and port details of sever. So Consumer of api, will have to parse First response. Create full http url and call the next api to get further details of student. It will not happen automatically.
eg http://localhost:8080/student/getAdvancedStudentDetails/123
{
id:123,
name:Alex,
nextapi:/student/getAdvancedStudentDetails/123
}
Note :
If your response had full http url for get advance details of student and if api was not secure api. Then if you view first Json, it might give you link for next api, which you can click and see advance details. You can give it try.

Soundcloud : Issue with API linked_partioning

Is there an issue with the linked_partitioning functionality of the soundcloud API
I have done further testing and the functionality behaves as expected for some of the API, but does not work in the following areas I have verified so far using an oAuth token and the /me resource (the token is valid and refreshed as needed) :
followers
following
Example :
https://api.soundcloud.com/me/followings?oauth_token=TOKEN&limit=50&linked_partitioning=1
This was previously returning data with the "next_href" field populated but now it returns
Using PHP json_decode on the data it shows
[next_href] =>
The raw Json is now
"next_href":null}

Even though Facebook API returns 'code' 200 for some 'nodes', when accessing the webpage it return 404

I'm developing a web app that uses FB data for some FB posts. I have a bunch of post ids and am fetching the data related to them using batched requests. Then am showing a summary of each post (number of comments, shares, likes) and link to the actual FB page (https://www.facebook.com/). But clicking on the link shows a 404 page on FB!!
Example, the node_id, '69983322463_10152179775342464' will return data in the graph explorer. But when you access https://www.facebook.com/69983322463_10152179775342464 it returns 404!
In case my question is not clear:
GET https://graph.facebook.com/69983322463_10152179775342464?access_token={a valid access token} returns data.
But GET https://www.facebook.com/69983322463_10152179775342464 (with or without an access_token param) returns a 404
Is there some field in the API response that signifies that the page does not exist anymore?
Thanks,
mano
This is because not every post is public. Only publicly available posts can be accessed directly.
For rest you need a valid access token to GET its details. When you tried the post id in graph api explorer it showed the result since an access token was applied.
So, you simply use a valid access token, may be any app access token (app_id|app_secret)- that never expires, and make the /GET request.
Eg: \GET /69983322463_10152179775342464?access_token={app-access-token}

Graph API doesnt return Profile's picture

I read this documentation, and it says that for retrieve picture I need to use an access token. So, I've use it using publish_actions and email as scopre/permission, but I don't see any `picture" returned on the JSON:
https://graph.facebook.com/myNickname/?access_token=myAccessToken
the rest of data is returned, the ones where access_token is required not. I should use User Access Token, not App Access Token.
The same happens for the others field, such as age_range. It is not returned.
You can see in the doc for age_range that the field will be retrieved only if you specify it in your request:
The user's age range; only returned if specifically requested via the fields URL parameter
The same happens to picture property. The problem is, that they didn't mention it in the documentation.
To get picture, specify in your request:
/me?fields=picture