Facebook Graph API tagged_places返回空数组 [英] Facebook Graph API tagged_places returns empty array

查看:187
本文介绍了Facebook Graph API tagged_places返回空数组的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试获取一个用户标记的标签\\ / em>,但数组总是回到空。如果我浏览图形浏览器并生成一个令牌,那么我按预期得到结果,但是使用在我的应用程序中生成的访问令牌,我会返回一个空数组。
我正在请求 user_tagged_places 权限,我知道我的应用程序将不得不进行审查,因为这个权限要求,但我只是用我自己的开发者帐户和测试用户进行测试,但是它不适用于任何一个。在发送我的应用程序进行审查之前,我可以获取数据吗?
提前感谢您的帮助。
编辑:
这是请求

I'm trying to get a users tagged_places but the array always comes back empty. If I go through the Graph explorer and generate a token then I get the results as expected but using an access token generated in my application I get returned an empty array. I am requesting the user_tagged_places permission, I know that my app will have to go for review because of this permission requirement but I am just testing right now with my own developer account and test users but it doesn't work for any of them. Will I be able to get the data prior to sending my app for review? Thanks in advance for the help. Here's the request

function get_fb_tagged_places($session, $uid)
{
    $request = new FacebookRequest($session, 'GET', '/'.$uid.'/tagged_places');
    $response = $request->execute();
    $graphObject = $response->getGraphObject();
    $events_array = $graphObject->asArray();
    return $events_array;
}

更新:
只是为了确保我添加了对我的所有权限应用程序,现在工作!为了保存我的权限删除权限,直到我弄明白了,有没有人知道需要哪些权限来获取 tagged_places ?我假设 user_tagged_places 是所有需要的,因为这是所有的SDK指南提及,但显然还有其他权限需要。

UPDATE: Just to be sure I added every permission to my app and it now works! To save me the hassle of removing permissions until I figure it out, does anybody know exactly which permissions are needed to get tagged_places? I assumed that user_tagged_places was all that was needed because that's all the SDK guide mentions but obviously there are other permissions required.

推荐答案

我有一个类似的问题,它没有 read_stream 我需要。所以我经过团体测试的权限,我想出了什么问题。
您需要具有标记的项目的权限
所以在我的情况下,我被标记在照片中,所以我需要 user_photos 权限访问 user_tagged_places 。你明显地被标记在某些人在他们的流上发布,所以你需要这个权限。 200的X- 200 X-

I have had a similar issue and it wasnt the read_stream permission I needed. So I went through permissions in groups testing them out and I figured out what the problem was. You need to have the permission of the item you were tagged in. So in my case I was tagged in photos, so I needed user_photos permission to gain access to user_tagged_places. You were obviously tagged in someones post on their stream so you needed that permission. It actually creates quite an issue because you need to know how a user was tagged to retrieve their tagged_places.

这篇关于Facebook Graph API tagged_places返回空数组的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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