Get likes from instagram ad post via API

邮差的信 提交于 2019-12-08 03:28:00

问题


I have deal with problem. I want to load likes from ad posts with API. For this I use 2 methods:

  1. https://api.instagram.com/v1/media/shortcode/D?access_token=ACCESS-TOKEN with this method I get media-id of record
  2. 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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!