问题
I have deal with problem. I want to load likes from ad posts with API. For this I use 2 methods:
- https://api.instagram.com/v1/media/shortcode/D?access_token=ACCESS-TOKEN with this method I get media-id of record
- https://api.instagram.com/v1/media/{media-id}/likes?access_token=ACCESS-TOKEN with this method I’m trying to get likes, but receive error, that media-id is incorrect.
How to get likes from ad posts?
回答1:
Well if it's saying your media id is not correct then its right.
https://api.instagram.com/v1/media/{media-id}/likes?access_token=ACCESS-TOKEN
Because this is the endpoint for likes in the instagram official Official Instagram API.
Confusion
Since it's a year i've been working on instagram API extensively, there is a tiny chance that you're taking the wrong media id.
if you're having media_id
like this 1442272751838402596_2344486445
this id is composed of two things and separated by _ (underscore).
POST_ID: 1442272751838402596
OWNER_ID: 2344486445
So becareful when you're getting the likes for a post using media ID.
来源:https://stackoverflow.com/questions/42011531/get-likes-from-instagram-ad-post-via-api