试图访问喜欢的内容时,Instagram的API返回沙箱用户空数据 [英] Instagram api returns empty data for sandbox users when trying to access liked contents

查看:270
本文介绍了试图访问喜欢的内容时,Instagram的API返回沙箱用户空数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

[我搜索过,但还没有找到一个类似的问题/解决方案在这里。所以张贴。如果有任何这样的内容,请教育我。]

[I've searched for it but haven't found a similar question/solution here. So posting it. If there is any such content, please educate me.]

我想用自己的身份验证的访问令牌,这是不是无效的,因为元状态,访问用户的喜爱内容200。如果我调用其它用户终端与此访问令牌,我得到的一些数据,但仅限于/用户/自/媒体/喜欢,它的返回空数据(元状态仍然是200)。

I'm trying to access a User's liked contents using his authenticated access token, which is not invalid as meta status is 200. If I call other user endpoints with this access token, I'm getting some data, but only for /users/self/media/liked, its returning empty data (meta status is still 200).

PS:该用户其数据我试图获取接受测试区用户对我的应用程序,并就喜欢一些媒体内容

PS: The users whose data I'm trying to fetch are accepted sandbox users for my app and have liked some media contents.

下面是我使用的网址:<一href=\"https://api.instagram.com/v1/users/self/media/liked?access_token=\">https://api.instagram.com/v1/users/self/media/liked?access_token={verified访问令牌}

Here is the url I'm using: https://api.instagram.com/v1/users/self/media/liked?access_token={verified access token}

而获得:{分页:{},元:{code:200},数据:[]}

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

任何帮助或指针是AP preciated!

Any help or pointers is appreciated!

推荐答案

我想我找到了解决办法!
事实是,在沙盒模式下运行的应用程序都是私人性质的,这意味着它从正常行为,我们所期望的限制。

I guess I found the solution! The thing is, apps running in Sandbox mode are private in nature, meaning it is restricted from the normal behavior we would expect.

在我的情况,我试图获取用户喜欢的内容。由于我的应用程序在沙盒模式下运行时,它的行为,如果有,除了那些谁被批准为沙盒用户没有Instagram的用户present。

In my case, I'm trying to fetch user liked contents. Since my app runs in sandbox mode, it behaves as if there is no instagram users present except for those who have been approved as sandbox users.

下面是一个情景:

假设:
1.假设有100个用户的Instagram的世界各地的(我知道它的更多,只是举例的缘故!)。
2.命名一个应用程序的 APP1 是活的,而不是在沙盒模式。
3.一个名为应用的 APP2 在沙盒模式[指不活呢!]。
4.有5个验证,并登记的沙盘用户作为APP2。

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.

现在,作为Instagram的文件说:这里将是暗箱流程

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

情况1: APP1尝试接受用户喜欢的沙箱/非沙盒的用户 - 结果:它得到他们的数据。原因:对于实时应用程序,用户在应用程序可见的数字是用户的Instagram上提供的号码

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.

情况2 :: APP2尝试接受用户喜欢:
对于沙盒用户的 - 这将只能得到那些数据(这里喜欢)该用户注册为用户沙箱为这个应用程序。任何其他喜欢非沙盒的用户将在这里不可见。 {仿佛5的用户存在,如果像那些5用户的任何内容的任何用户,这将是可见的。}
对于非沙盒的用户的 - 用户是不可见的。

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.

希望它帮助!

这篇关于试图访问喜欢的内容时,Instagram的API返回沙箱用户空数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆