Facebook:有没有办法获取当前不是我的朋友的用户的位置?图形API或FQL [英] Facebook: Is there a way of getting the current_location of users who are not my friends? Graph API or FQL

查看:140
本文介绍了Facebook:有没有办法获取当前不是我的朋友的用户的位置?图形API或FQL的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们假设我有一个用户名和用户名。我手动打开她的Facebook页面(即 http://www.facebook.com/username ,那里它是!生活在字段出现说她住在任何地方
然而,当我尝试使用FQL(使用Python)获取当前位置:

  q ='select uid,username,current_location FROM user WHERE uid =%s'%aUser 

我在current_location字段中获得



另一方面,我可以轻松地从我的朋友检索current_location(我的意思是,对于那些已经将其位置公开的朋友):

  SELECT current_location FROM用户WHERE uid IN(SELECT uid2 FROM friend WHERE uid1 = me())

我知道< a href =http://developers.facebook.com/docs/authentication/permissions/#user_friends_perms =nofollow>权限,但应该有一种获取位置的方法。实际上,我可以看到甚至不是朋友朋友的用户的位置(住在)。我该怎么做??感谢提前。

解决方案

在处理Facebook作为普通用户时,与通过他们API。



应用程序无法访问网站上所有看似公开的信息。他们的系统行为如此,以便应用程序无法挖掘数据。 Facebook不希望应用程序能够收集未明确允许该应用查看其个人信息的用户的数据。



如果一个人知道你的一般位置,这可能是无害的,但如果一个应用程序是在Facebook上收集人们的位置,那么就会有一个隐私问题。 >

Let's imagine I have a user ID and username. I manually open her Facebook page (namely, http://www.facebook.com/username. And there it is! The "lives in" field appears saying she lives in wherever. Nevertheless, when I try to fetch her current_location using FQL (using Python):

q = 'SELECT uid, username, current_location FROM user WHERE uid=%s' % aUser

I get None in the field current_location.

On the other hand, I can easily retrieve the current_location from my friends (I mean, for those friends who have made their location public):

SELECT current_location FROM user WHERE uid IN (SELECT uid2 FROM friend WHERE uid1 = me())

I know about the permissions, but there should be a way of fetching locations. In effect, I can see the location (lives in) of user who are not even friends of my friends. How can I do it?? Thanks in advance.

解决方案

There is a difference when dealing with Facebook as a normal user as opposed to an application accessing Facebook through their API.

An application doesn't have access to all the seemingly "public" information there is on the site. Their systems behave like this so that applications are not able to "mine data". Facebook doesn't want applications to be able to gather data on users that have not explicitly allowed that application to view their personal details.

It might be harmless if a person knows your general location, but if an application was to gather peoples locations all over Facebook, there would be a privacy issue.

这篇关于Facebook:有没有办法获取当前不是我的朋友的用户的位置?图形API或FQL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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