使用fql获取Facebook事件 [英] Getting Facebook Events using fql

查看:111
本文介绍了使用fql获取Facebook事件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

尝试使用以下查询通过fql检索Facebook事件。我无法获得除id之外的场地详细信息。

Trying to retrieve facebook events through fql using the query below. I am unable to get venue details other than "id".

fql?q = SELECT名称,描述,pic_small,pic_big,eid,场地,来自事件的位置WHERE eid in(SELECT eid FROM event_member WHERE uid = me())

fql?q=SELECT name,description, pic_small,pic_big, eid,venue,location from event WHERE eid in (SELECT eid FROM event_member WHERE uid = me())

输出:

{
  "data": [
    {
      "name": "HappyHour",
      "description": "Let's have fun !!!",
      "pic_small": "http://profile.ak.fbcdn.net/static-ak/rsrc.php/v2/yy/r/XcB-JGXohjk.png",
      "pic_big": "http://profile.ak.fbcdn.net/static-ak/rsrc.php/v2/yn/r/5uwzdFmIMKQ.png",
      "eid": ......,
      "venue": {
        "id": .......
      },
      "location": "The Crab Pot Seattle"
    }
  ]
}

图表api doc说被查询的事件正在举行的场所。包含一个或多个以下字段:街道,城市,州,邮政编码,国家,纬度和经度。但我没有看到任何这些除了场地ID。

The graph api doc says "The venue where the event being queried is being held. Contains one or more of the following fields: street, city, state, zip, country, latitude, and longitude." but I don't see any of these except venue id.

我是否必须再提请图形API获取场地位置详细信息?是否有更好的方式在一个查询中获取位置详细信息?

Do I have to make another request to graph API to get the venue location details? Is there a better way to get the location details in one query itself?

推荐答案

您可以使用这个FQL Multiquery

这将获得您的活动和有关场地的信息。你必须在最后写一个脚本将它们组合成可用的东西。

This will get your events and information about their venues. You'll have to write a script on your end to combine them into something usable.

fql?q={
 "event_info":
    "SELECT name,description, pic_small,pic_big, eid,venue,location 
      FROM event WHERE eid IN 
         (SELECT eid FROM event_member WHERE uid = me())", 
  "event_venue":
     "SELECT name, username, page_id, location 
        FROM page WHERE page_id IN 
          (SELECT venue.id FROM #event_info)"
 }

Facebook在4月份的某个时候更改了活动的默认编码。以前是所有的位置数据总是被返回。从那时起,只返回位置的 id

Facebook changed the default encoding for events sometime in April. It used to be that all location data always used to be returned. Since then only the id of the location has been returned.

这篇关于使用fql获取Facebook事件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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