I am using soundcloud resolve. This example is working:
http://api.soundcloud.com/resolve.json?url=https://soundcloud.com/katermukke/tracks&client_id=CLIENT_ID
However this is not working:
http://api.soundcloud.com/resolve.json?url=https://soundcloud.com/ferry-corsten/tracks&client_id=CLIENT_ID
If you add CLIENT_ID and open in browser you will see the results. Second one returns empty array.
Can anybody explain why?
Related
I searched everything here and didn't find the answer.
I'm calling FB API to get some posts analytics, but I find a strange behaviour. If I call for example
134572506600855_2227601433964608/?fields=comments.limit(0).summary(true)
I get comments total_count=100
134572506600855_2227601433964608/comments?limit=0&summary=true&filter=stream
I get comments total_count=575
this is because I added filter=stream, so it counts comments-of-comments like it does in the public counter. I need to use the first call because I get all the other details there and i want to avoid an API call for each post just to get the right comments total_count, but I cannot get filter=stream working with the first call,any suggestion?
I am trying to get all the reactions of a facebook post with post_id/reactions in Graph API. But the returned data array is always empty. I have generated the access token with all the user data permissions. I am attaching a screenshot of the scenario.
Does this problem has something to do with some more permission?
EDIT:
I also found out that this post_id/reactions is only showing the data of my reactions of a post. So, if I react on a post and do a graph api query for that post, it will show my information only. Does anybody know the reason/solution for this? Attaching the scenario.
EDIT 2:
I followed a youtube tutorial to do it like this. But apparently, it cannot be done (at least with this way!). It is mentioned in the documentation (screenshot attached).
If anybody can still provide me any other way to do this, please mention.
You can view the reaction of the user if you have his access token. This with:
{post-id}/?fields=reactions.type(LIKE).limit(0).summary(1)
The returned field "viewer_reaction" is the reaction of the user in the post.
I am trying to fetch all of my instagram page's posts (around 57k posts) from facebook's graph API. using the 'media' endpoint described here:
https://developers.facebook.com/docs/instagram-api/getting-started
I have managed to get around 12k posts using it using the query below:
https://graph.facebook.com/v3.3/{ig-user-id}/media?access_token=XXX&pretty=0&fields=timestamp,caption,comments_count,like_count,media_type,media_url,owner,permalink,shortcode,thumbnail_url,username&limit=200
when using this link returning result contains a data part which is for posts' data and a pagination section which includes next and previous urls and cursors for after and before. I used next and got remaining posts each time, until the result didn't have a next url but it had an after cursor but when I used it the data returned was empty.
I thought there might be some kind of limitation, but couldn't find anything so far except for the API rate limits which I don't exceed.
I also tried the graph API explorer and got the same result.
The problem was not solved but I found something I hadn't seen before, it might help people confused like me.
in the endpoint documentation it is declared that this endpoint has a 10k recent posts limitation, therefor we cannot get any more of our posts.
How can one get multiple attachments of a post/status in a group?
For example: A group status that some member wrote and added multiple photos to..
Currently I am using Graph api to get the group stream with group_id/feed and unable to see images attached to a single status - while accessing the feed from Facebook itself I can validate that there are few photos attached to the status.
Using FQL it is possible to get the attachments with the following query:
SELECT attachment FROM stream WHERE post_id = each_post_id
Considering I will have to send this request per post and that FQL will soon be gone I am searching for an alternative.
I was looking for a solution for this as well and actually just found it.
The Facebook Platform changelog says the following:
/v2.1/{post-id} will now return all photos attached to the post: In
previous versions of the API only the first photo was returned with a
post. This removes the need to use FQL to get all a post's photos.
With this knowledge I went to the Graph Api Explorer and found a post that had 2 attachments or more added to it.
After finding the post, and with that the post id, I tried the request Facebook told me to do:
/v2.1/{post_id}
This does NOT give you the desired result. The nice thing about the explorer is that you can search for fields you want to add to your request.
You want to add the attachments (plural) field. NOTE: It might be that the graph api explorer only shows the attachment (singular) field. This is NOT right.
So, to summarize:
Get the post id of the post containing the images.
Create a new request to the graph api that looks something like: /v2.1/{post_id}?fields=attachments
Then read the result to get your desired attachments.
I hope this helps you out as I have been struggling for a while as well.
KR
PS: This is tested with a user and not a group, but it should be basically the same.
PS2: This is just an explanation of how you get attachments of a single post. You can also add the attachments field to the /me/home egde to immediately get all attachments at every post like so:
me/home?fields=message,from,attachments
PS3: The permissions you need are
user_status
read_stream
user_photos
user_videos
Facebook is not very clear on this matter and it is very hard to figure things out like this. So I hope this will help everyone that is searching for this solution.
I answered for the same question here : /v2.1/{post-id} does not deliver photos
It seems it's a Facebook bug. My colleague opened an issue. Here's the link: https://developers.facebook.com/bugs/762280800482269/
You also can find some info here:
https://developers.facebook.com/bugs/790976317600139/
Hope it will help you.
I want to get all the photos of the user who gave permission to the app. Currently, I tried single and batch request of Graph API but it always paginates the results. Is there a seamless way to get all the objects without following pages?
ps: I'm using PHP-SDK so answering in php is the money :)
I found out that giving limit=0 is solving the problem. It still generates paging object but they return empty data set. So, limit=0 returns the whole dataset in one shot.