从FQL,我们希望在php中获取用户当前位置 [英] From FQL we want to get users current location in php

查看:66
本文介绍了从FQL,我们希望在php中获取用户当前位置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想从Facebook收到属于我所在城市的朋友,为此我使用current_location.city。
但它不工作...请帮助我。
谢谢

解决方案

这个FQL查询对我有用。它返回每个用户的{uid,current_location}的数组,其中current_location包含我想要的城市的文本。

  SELECT uid ,current_location FROM user WHERE uid in(SELECT uid2 FROM friend WHERE uid1 = me())AND'Seattle'in current_location 

将西雅图更改为您想要的任何城市,或使用变量从当前用户中获取城市名称。


I want to get my friends which belongs to my city from facebook and for this i use current_location.city. But its not working... please help me. Thanks

解决方案

This FQL query works for me. It returns an array of each user's {uid, current_location} where the current_location includes text of the city that I want.

SELECT uid, current_location FROM user WHERE uid in (SELECT uid2 FROM friend WHERE uid1 = me()) AND 'Seattle' in current_location

Change 'Seattle' to whatever city you'd like, or use a variable to grab the city name from the current user.

这篇关于从FQL,我们希望在php中获取用户当前位置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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