Instagram API doesn’t find any liked posts for sandbox users

后端 未结 4 1635
不思量自难忘°
不思量自难忘° 2020-11-30 00:30

I’m using the Instagram API in sandbox mode. I’m trying to access a User’s liked posts from the Instagram API using their authenticated access token. This user is one of the

相关标签:
4条回答
  • 2020-11-30 01:13

    If still getting

    {"pagination": {}, "meta": {"code": 200}, "data": []}
    

    for other calls e.g.

    https://api.instagram.com/v1/users/self/media/recent?access_token=732...
    

    make sure to make calls to public account by going to Settings->Privacy & Security(tab)->Account Privacy(section), unchecking 'Private Account'. Instagram redefines privacy lately with stricter API changes.

    0 讨论(0)
  • 2020-11-30 01:18

    If anyone has this problem since after 1st of June, there's a way to bypass that sandbox problem much easier with instagram.pixelunion.net

    Later I found a better working one services.chrisriversdesign.com/instagram-token/

    0 讨论(0)
  • 2020-11-30 01:21

    When your app behaves in sandbox mode, it’s restricted compared to normal behaviour. In particular (quoting from the API docs for the sandbox):

    The API behaves as if the only users on Instagram were your sandbox users, and the only media ever posted were the last 20 for each of these users.

    So the API can’t see posts that the user has liked if those posts were made by non-sandbox users.


    Here's a scenario:

    Assumptions:

    1. Say there are 100 instagram users all over the world(I know its more, just for example's sake!).
    2. An app named APP1 is live and not in sandbox mode.
    3. An app named APP2 is in sandbox mode[meaning not live yet!].
    4. There are 5 verified and registered sandbox users for APP2.

    Now, as Instagram document has said: Here will be the black box flow.

    Situation 1:: APP1 tries to accept user likes for sandbox/non-sandbox users - Result: it gets their data. Reason: For live apps, number of users visible to the app is the the number of users available on instagram.

    Situation 2:: APP2 tries to accept user likes: For sandbox user - It will get only those data(likes here) for which the users are registered as sandbox users for this app. Any other likes for non-sandbox users will be not visible here. {As if 5 users existed, if any users like any content of those 5 users, it will be visible.} For non-sandbox users - Users are not visible!

    I missed the last part of visibility, which took me some research and co-relation to find out. I guess there might me other developers who might have not understood the sandbox user's visibility part of the document.

    0 讨论(0)
  • 2020-11-30 01:34

    Simple solution, Like one of your own instagram pics. That way your "recent likes" will increase likes of another sandbox user (you), and will not be empty.

    0 讨论(0)
提交回复
热议问题