简体   繁体   中英

Can I get all posts from instagram based on a specific tag with the new Facebook Graph API?

Right now I am using Instagram API Platform with the "Public Content - capabilities to read public media on a user's behalf" rights for my app. As it is stated on the website, it will be deprecated on December 11, 2018 and they are pointing to the new Instagram Graph API.

I went through the documentation but could not find what I need. I would like to know if it is possible with the new API to:

  1. Get all posts info (user that posted, the number of followers, caption, likes count and the media itself). With the Mentions API from Instagram Graph API you can get all posts where your Business account is tagged @account, but they require media_id which I don't have, how do I get it?
  2. Get all posts with a specific hashtag, of a specific user (non-business account) within a timeframe. From the comments it is clear that this is not possible for now. Still hope to get an answer to my first question.

I would like to know if the above mentioned are possible with the new API and it would be nice if you can point me to the right API. Thank you in advance

but they require media_id which I don't have, how do I get it?

You can get the list of media id's on which an account has been tagged using the tags endpoint.

v4.0/<account id>?fields=tags

Once you have the list of media items in which the account has been tagged, you can cycle through them and return the following fields each media post.

Returnable Fields: caption, comments, comments_count, like_count, media_type, media_url, owner — The ID of the user who owns the object., timestamp, username

With the owner ID of the post you might be able to look up more of the fields you are looking for, but you will likely run into some permission issues.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM