FB Graph / FQL:当FB页面显示位置时,朋友的Current_location有时会读为空 [英] FB Graph / FQL: Current_location of friends is sometimes reading Null when FB page shows a location

查看:122
本文介绍了FB Graph / FQL:当FB页面显示位置时,朋友的Current_location有时会读为空的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在Facebook上拉一下用户的所有朋友的当前位置,并且遇到一个好奇的问题,其中一些朋友正在读出NULL,当我们可以在他们的实际Facebook页面上看到它说生活在 中。这个错误的难点在于它只发生在大概30%的情况下。在其余的情况下,它会提取所有正确的信息,这告诉我权限可能正确设置。



具体来说,我正在使用的FQL代码是:

  SELECT uid,
name,
current_location
FROM USER
WHERE uid IN(SELECT uid2
FROM friend
WHERE uid1 = Me())

当直接向图形进行JavaScript请求时,出现了同样的问题,因此它似乎也不是FQL问题。有没有人知道为什么current_location可能有时会失败并报告NULL,但不总是?



谢谢。

解决方案

隐私设置的优先级高于Facebook api。



如果用户限制了隐私设置中的特定信息,即使用户授予该权限,您也无法通过facebook api(图,fql,rest api)获取。



例如



如果我仅限于在隐私设置上分享我的生日,即使他们要求,也没有任何应用可以抓住我的生日。



此外,用户可以限制应用获取特定信息。



例如用户可以允许应用程序 xyz 访问他们想要的所有内容,但同时用户可以限制应用程序 xyz 访问他的位置



我希望这回答你的问题。


I am attempting to pull the current location of all of a user's friends on facebook, and am running into a curious problem wherein some of those friends are reading out NULL when I can see on their actual Facebook pages that it says "Lives in ,." The difficult part of this error is that it only happens on probably ~30% of cases. On the remaining cases, it pulls all of the correct information, which tells me that the permissions are probably set up correctly.

To be specific, the FQL code I am using is:

SELECT uid,
       name,
       current_location
FROM   USER
WHERE  uid IN (SELECT uid2
               FROM   friend
               WHERE  uid1 = Me())

This same issue has arisen when making javascript requests directly to the graph, so it doesn't appear to be an FQL issue either. Does anyone know why current_location might sometimes fail and report NULL, but not always?

Thank you.

解决方案

Privacy settings have a higher priority than facebook api's.

If user has restricted particular info from privacy setting, you wont be able to fetch that by facebook api's (graph, fql, rest api) even if user grants permission for that.

e.g.

If I have restricted to share my birthday on privacy setting, no app would be able to grab my birthday even if they ask for it.

Also, user can restrict apps from getting particular info.

e.g. User can allow app xyz to access everything they want but at the same time user can restrict app xyz to access his location

I hope this answers your question.

这篇关于FB Graph / FQL:当FB页面显示位置时,朋友的Current_location有时会读为空的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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