fetching images from a public Instagram hashtag

跟風遠走 提交于 2019-12-02 18:27:58

问题


I am developing a website for a couple that are getting married and they created #somehashtag where other people can post images to. I want to fetch all images from that hashtag and post it on the site. Nothing works. Ideally I want to use php, but javascript/jquery would do.

What have you tried? The answer is probably everything

  • InstafeedJS doesn't work, nothing shows
  • Old php scripts, even from 2015 posted on SO or elsewhere does not work, nothing works.
  • Php libraries are old and unsopported, even the official Ruby and Python libraries!
  • Endpoints, require ACCESS-TOKEN and that's well, a very long story:

https://api.instagram.com/v1/tags/somehashtag?access_token=API_CLIENT and https://api.instagram.com/v1/tags/somehashtag?access_token=API_SECRET

Give:

{"meta": {"error_type": "OAuthPermissionsException", "code": 400, "error_message": "This client has not been approved to access this resource."}}

Now trying to generate an access token using third party apps, only generate tokens that can access my account, but the hashtag is not something for me, so the access token will be invalid when fetching hashtags.

Generating tokens using instagram require me asking for permission, as far as I know, correct me if I'm wrong, and if I try to do that I get

I tried to contact instagram support but they cannot be reached obviously.


回答1:


you can use this link for view top hashtag

https://www.instagram.com/explore/tags/YOUR_HASHTAG/?__a=1



回答2:


if you want create app which can get hashtag on public mode, first thing you must do is create a submission to instagram. alternative way is, you can try first on sandbox mode. but dont forget to authorize your access token for any scope



来源:https://stackoverflow.com/questions/38020993/fetching-images-from-a-public-instagram-hashtag

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