retrieve instagram images- get access denied messa

2019-07-02 01:42发布

问题:

Have created an app to retrieve instagram images from a Twitter rest feed.

Normally it works but occassionally get an 'access denied' message from the Instagram CDN.

For instance

http://distilleryimage2.s3.amazonaws.com/b6c991f4d9bd11e2b9fd22000a9f4dd4_7.jpg

Does anyone know a way to circumvent this?

Am using Adobe AIR for the app.

回答1:

The instagram image urls can get moved around on s3, changed, or deleted at any time. You cannot circumvent this, but rather you can do one of the following:

  1. Subscribe to the user/tag you are interested in and process the updates accordingly.
  2. Build a polling mechanism to periodically update your data to supplement #1

Also, I've observed this happening for users who make their feed private. I believe you can follow them to get access if they approve or you're able to authenticate them using their OAuth token. Interestingly, if you know a tag that they've used, the tag endpoints don't respect this privacy at all.