Facebook FQL:获取范围内的签到

本文介绍了Facebook FQL:获取范围内的签到的处理方法,对大家解决问题具有一定的参考价值

问题描述

有没有办法使用 FQL 选择我在指定位置范围内的所有朋友签到?我可以使用 FQL 返回我朋友的签到坐标:

Is there a way to use FQL to select all my friends Checkins that are in range of a specified location? I can use FQL to return my friends checkin coords:

https://api.facebook.com/method/fql.query?access_token={0}&query=SELECT coords FROM checkin WHERE author_uid IN (SELECT uid2 FROMfriend WHERE uid1 = me())

但是我怎样才能添加到上面的查询中来做类似......

but how can I add to the above query to do something like...

Where coords 在 [(New York City, NY) | 10 英里内](长,纬度) |(user.current_location)]

任何帮助将不胜感激.提前致谢.

Any help would be greatly appreciated. Thanks in advance.

编辑(美国东部时间 3 月 9 日下午 3:05):

我主要只是在寻找最终结果 - 不需要在单个 FQL 语句中取回所有内容,甚至不需要使用 FQL(可能是图形 API?)我知道我可能需要将数据取回由于 FQL/图形 api 的限制,可以在本地使用它.我只是想以一种有效的方式来做这件事,这样用户就不必等待 20 秒来加载所有内容.

I'm mainly just looking for an end result - doesn't need to get everything back in a single FQL statement, or even use FQL (graph api, possibly?) I understand I may need to bring it back data back in pieces and work with it locally due to the limitations of FQL/the graph api. I just want to do it in an efficient manner so a user doesn't have to wait 20secs for everything to load.

当前的问题是,如果某人有数百个朋友,并且每个朋友的所有签到都返回,则数据量太大,无法处理.

The immediate problem is that if someone has several hundred friends and all checkins for each friend are returned, that's too much data to work with.

我正在寻找的结果的详细信息是从我所有的朋友开始,最后是他们在过去 X 天内签到的前 10 个地点(基于签到位置 ID 的最高频率),在用户当前 facebook 位置的 Y 距离内,并且该位置的页面属于某个类别的位置,如酒吧.

The granular details of the result I'm looking for is to start with all my friends, and end up with the top 10 places (based of highest frequency of the checkin's location ID) they checked into within the last X days, that are within Y distance of the users current facebook location, and where the location's page falls into a certain category, like a bar.

这就是我正在处理的情况,我希望我附加的附加信息不会使我原来的问题复杂化.谢谢!

That's the scenario I'm dealing with and I hope the additional information I appended doesn't complicate my original question. Thanks!

推荐答案

所以有一些未公开的名为 distance() 的函数可能会对您有所帮助,尽管它效果不佳(特别是因为它仅限于 50 公里半径):

So there's some undocumented function called distance() that might help you, although it doesn't work so well (especially since it's limited to 50km radius):

SELECT coords, author_uid, tagged_uids, target_id, message FROM checkin WHERE target_id IN
(SELECT page_id FROM place WHERE distance(latitude, longitude, "37.75377496892", "-122.42077080676") < 50000)

最大为 50,000 ,这是 FQL(显然未记录)distance函数的输出单位.

Max is 50,000 meters, which is the output unit of FQL's (apparently undocumented) distancefunction.

https://developers.facebook.com/docs/reference/fql/checkin/https://developers.facebook.com/docs/reference/fql/place

这篇关于Facebook FQL:获取范围内的签到的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,WP2

admin_action_{$_REQUEST[‘action’]}

do_action( "admin_action_{$_REQUEST[‘action’]}" )动作钩子::在发送“Action”请求变量时激发。Action Hook: Fires when an ‘action’ request variable is sent.目录锚点:#说明#源码说明(Description)钩子名称的动态部分$_REQUEST['action']引用从GET或POST请求派生的操作。源码(Source)更新版本源码位置使用被使用2.6.0 wp-admin/admin.php:...

日期:2020-09-02 17:44:16 浏览:1159

admin_footer-{$GLOBALS[‘hook_suffix’]}

do_action( "admin_footer-{$GLOBALS[‘hook_suffix’]}", string $hook_suffix )操作挂钩:在默认页脚脚本之后打印脚本或数据。Action Hook: Print scripts or data after the default footer scripts.目录锚点:#说明#参数#源码说明(Description)钩子名的动态部分,$GLOBALS['hook_suffix']引用当前页的全局钩子后缀。参数(Parameters)参数类...

日期:2020-09-02 17:44:20 浏览:1060

customize_save_{$this->id_data[‘base’]}

do_action( "customize_save_{$this-&gt;id_data[‘base’]}", WP_Customize_Setting $this )动作钩子::在调用WP_Customize_Setting::save()方法时激发。Action Hook: Fires when the WP_Customize_Setting::save() method is called.目录锚点:#说明#参数#源码说明(Description)钩子名称的动态部分,$this->id_data...

日期:2020-08-15 15:47:24 浏览:800

customize_value_{$this->id_data[‘base’]}

apply_filters( "customize_value_{$this-&gt;id_data[‘base’]}", mixed $default )过滤器::过滤未作为主题模式或选项处理的自定义设置值。Filter Hook: Filter a Customize setting value not handled as a theme_mod or option.目录锚点:#说明#参数#源码说明(Description)钩子名称的动态部分,$this->id_date['base'],指的是设置...

日期:2020-08-15 15:47:24 浏览:888

get_comment_author_url

过滤钩子:过滤评论作者的URL。Filter Hook: Filters the comment author’s URL.目录锚点:#源码源码(Source)更新版本源码位置使用被使用 wp-includes/comment-template.php:32610...

日期:2020-08-10 23:06:14 浏览:925

network_admin_edit_{$_GET[‘action’]}

do_action( "network_admin_edit_{$_GET[‘action’]}" )操作挂钩:启动请求的处理程序操作。Action Hook: Fires the requested handler action.目录锚点:#说明#源码说明(Description)钩子名称的动态部分$u GET['action']引用请求的操作的名称。源码(Source)更新版本源码位置使用被使用3.1.0 wp-admin/network/edit.php:3600...

日期:2020-08-02 09:56:09 浏览:873

network_sites_updated_message_{$_GET[‘updated’]}

apply_filters( "network_sites_updated_message_{$_GET[‘updated’]}", string $msg )筛选器挂钩:在网络管理中筛选特定的非默认站点更新消息。Filter Hook: Filters a specific, non-default site-updated message in the Network admin.目录锚点:#说明#参数#源码说明(Description)钩子名称的动态部分$_GET['updated']引用了非默认的...

日期:2020-08-02 09:56:03 浏览:855

pre_wp_is_site_initialized

过滤器::过滤在访问数据库之前是否初始化站点的检查。Filter Hook: Filters the check for whether a site is initialized before the database is accessed.目录锚点:#源码源码(Source)更新版本源码位置使用被使用 wp-includes/ms-site.php:93910...

日期:2020-07-29 10:15:38 浏览:825

WordPress 的SEO 教学:如何在网站中加入关键字(Meta Keywords)与Meta 描述(Meta Description)?

你想在WordPress 中添加关键字和meta 描述吗?关键字和meta 描述使你能够提高网站的SEO。在本文中,我们将向你展示如何在WordPress 中正确添加关键字和meta 描述。为什么要在WordPress 中添加关键字和Meta 描述?关键字和说明让搜寻引擎更了解您的帖子和页面的内容。关键词是人们寻找您发布的内容时,可能会搜索的重要词语或片语。而Meta Description则是对你的页面和文章的简要描述。如果你想要了解更多关于中继标签的资讯,可以参考Google的说明。Meta 关键字和描...

日期:2020-10-03 21:18:25 浏览:1695

谷歌的SEO是什么

SEO (Search Engine Optimization)中文是搜寻引擎最佳化,意思近于「关键字自然排序」、「网站排名优化」。简言之,SEO是以搜索引擎(如Google、Bing)为曝光媒体的行销手法。例如搜寻「wordpress教学」,会看到本站的「WordPress教学:12个课程…」排行Google第一:关键字:wordpress教学、wordpress课程…若搜寻「网站架设」,则会看到另一个网页排名第1:关键字:网站架设、架站…以上两个网页,每月从搜寻引擎导入自然流量,达2万4千:每月「有机搜...

日期:2020-10-30 17:23:57 浏览:1298