- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我想做什么
我正在尝试提取 2012 年和 2013 年在给定城市发生的所有 public facebook 事件的列表。此外,对于每个事件,我想提取以下内容:
到目前为止我尝试了什么
我一直在图资源管理器中尝试以下查询
search?q={Oslo}& [type={event}](#searchtypes)
我暂时忽略了日期范围限制。我想我可以稍后解决这个问题。
问题
这是列出状态更新(故事)、地点和其他所有内容,并将其作为 JSON 对象返回。但是,这不会为我提供我需要的所有数据字段。有什么想法吗?
旁注
我已经尝试查看 FQL,但显然不能进行这样的搜索? (如果可以,请随时提供帮助)。我得到的最接近的是:
SELECT eid FROM event_member WHERE uid IN
(SELECT page_id FROM place WHERE
distance(latitude, longitude, "37.76", "-122.427") < 1000)
但这只会给我 future 的事件。也许它也能让我回顾过去?
最佳答案
搜索您未以任何方式链接到的公共(public)对象(没有参与,没有邀请)只能通过 Graph Search API 完成,而不能使用 Graph API 或 FQL。
目前,this is the only documentation for Graph Search .您会发现此 API 没有提供太多可能性,因此如果您想要实现您的目标,您将不得不拼凑一些东西。没有任何直接的方法可以做到这一点。
如果我们收集有关事件的信息,这几乎就是我们所拥有的一切:
Search Types
Events: https://graph.facebook.com/search?q=conference&type=event
Fields
You can restrict the fields returned by these searches using the?fields= URL parameter, in the same way you can when reading otherobjects. For example, to get only the names of events, you can do thefollowing:
Event Names:https://graph.facebook.com/search?fields=name&q=conference&type=event
Time
When searching for public posts or posts on the user's News Feed, youcan page over the results by using the since, until and limitparameters. since and until both accept a unix timestamp. When pagingback in time, you should use until in conjunction with limit whereuntil is the unixtime value of the created_time field in the lastobject returned by your previous query. When paging forward in timeyou should set since to be the unixtime value of the created_timefield in the first object returned by your previous query. Pleasenote, you can only search about 1 to 2 weeks back in the News Feed.
接下来要知道的是,结果集由其中一个字段包含您要查找的字符串 (q=Oslo
) 的事件组成。因此,“Oslo”可能会出现在消息、描述中,可能是位置字段中的幸运,也可能是时区字段中的不幸。
然后您将不得不“手动”过滤掉结果。您可能只搜索包含“Oslo”的事件,然后检查该位置是否确实包含“Oslo”。或者,如果您想轻松查找具有特定位置的事件,我建议您搜索格式为 “City, Country”的字符串"
,因为这就是 Facebook 格式化城市的方式。所以你可以这样做:
search?fields=location&q="Oslo, Norway"&type=event&since=1356994800
1356994800
是从那时起您要检索事件的 unixtime。
可能的结果:
{
"data": [
{
"location": "Oslo, Norway",
"id": "211893915563330",
"start_time": "2022-02-08T00:00:00"
},
{
"location": "Lillestrøm, Norway",
"id": "641379122561097",
"start_time": "2015-09-06T09:00:00+0200"
},
{
"location": "Oslo, Norway",
"id": "1434492323451716",
"start_time": "2014-11-06T20:45:00+0100"
},
{
"location": "Oslo, Norway",
"id": "563423357073321",
"start_time": "2014-09-20"
},
...
{
"location": "Oslo, Norway",
"id": "628230923890648",
"start_time": "2013-01-16T19:00:00+0100"
}
],
}
然后,或许可以使用 Google Maps API 来查明找到的位置是否确实靠近奥斯陆。 IE。 “Lillestrøm, Norway”离它很近。
关于facebook - 过去两年中给定位置的所有 facebook 事件列表,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21286441/
我为我们的业务创建了一个 Facebook 页面,我创建了一个 Facebook 应用程序来获取 AppID,以便在 Facebook 插件中使用它。 我注意到 Facebook 应用程序的页面看起来
是否有可能知道哪个 Facebook 用户点击了我的应用用户在 Facebook 上分享的链接? 为了清楚起见,让我改写一下:我想知道我的应用用户的哪些 friend 点击了他的共享链接。 感谢任何提
我正在浏览 facebook pixel,对 facebook pixel 如何知道哪个转化来自哪个 facebook 广告感到很困惑? 假设我有这个 url http://example.com安装
我正在开发 sucsongmoi.net(越南语),当浏览者从他们的墙上分享网站链接时,一些链接 facebook 获得描述和图像,一些链接 facebook 无法获得描述和图像。 例如:分享 suc
一位同事错误地设置了个人 Facebook 页面;它应该是一个企业 Facebook 页面。 个人页面上有几个 friend 需要重定向到正确的 Facebook 业务页面。 我可以将用户从错误的个人
在 Facebook 上,当您转到“编辑我的个人资料”>“艺术和娱乐”时,会有一个“电影”自动完成小部件,它会在您输入电影时推荐电影。 因此,如果您输入“Jones”,它将开始建议: 印第安纳琼斯 布
我在我的网页上使用 Facebook 登录。首次登录时,Facebook 登录应用程序会请求获取用户数据的权限。 有什么方法可以改善这个问题,以请求喜欢我的 Facebook 页面的许可?用户点击后,
我需要知道是否可以将现有的 Facebook 页面(类别:应用程序页面)链接到 Facebook 应用程序?当我进入 Facebook 应用程序设置时,他们建议创建一个新页面。但我需要的只是链接到现有
我的网站应用程序具有通过 Facebook 登录进行登录的功能。为此,我的应用程序出现在 Facebook 上。使用 Facebook 登录工作正常。 但应用程序具有将 Facebook 帐户链接和取
我正在制作一个应用程序,让人们可以在 Facebook 上与特定的 friend 分享内容。示例:Alice 使用我的应用程序,她与 Bob 分享了一篇文章,Bob 是她的 Facebook 好友。现
我正在按照列出的说明进行操作 http://docs.appcelerator.com/platform/latest/#!/api/Modules.Facebook 并查看 Arrow 示例目录中的
假设我有一个餐厅的商业网站,一位顾客为一大群人预订了一张 table 。有没有一种方法可以让客户有机会在餐厅网站上创建 Facebook 事件,作为预订流程的一部分。我知道客户必须以某种方式从餐厅网站
我想让我的用户将他们的用户帐户与 Facebook 或 Twitter 相关联,并允许他们使用他们的 Facebook/Twitter 帐户登录我的服务器,而不是使用传统的用户名/密码。与StackO
我们有一个面子书页面。我们添加了一个自定义 FBML 选项卡。现在我们要添加评论面子书插件。我尝试添加一个脚本,我从 Face book Social Plug in .代码是 之后我将此脚本放入自
大家好 请帮我找到关于以下的官方信息: 1) 什么是“FaceBook 登录” 2) 什么是“FaceBook Connect” 谢谢 最佳答案 你可以在那里找到你需要的一切: http://deve
这是最奇怪的事情。我有非常简单的 CF 代码,查看 cgi.HTTP_REFERER。简单地说,它查看推荐人。如果链接是从我们的主要网站域之外单击的,它会显示一些内容。否则,什么也不会发生。所以,如果
我还是 Facebook Graph API 的新手,正在尝试开始使用 Facebook 地点搜索。 (按位置搜索地点) https://graph.facebook.com/search?type=
我不想开设 Facebook 帐户,但我被要求为需要使用 Facebook API 的应用程序开发功能。有没有一种方法可以开发这些功能并使用 Facebook API,而无需开设个人 Facebook
我已经按照指示实现了 DotNetOpenAuth 提供的示例应用程序 here . 正如您在下面看到的,这要求用户安装此 facebook 应用程序。 我只是想让用户使用他们的 Facebook 登
我的主页上有标准的 Facebook 登录按钮,我不希望人们仅在用户单击登录按钮时使用他们的 Facebook 帐户自动登录我的网站。 如果用户未登录 Facebook,将出现一个弹出窗口询问他的凭据
我是一名优秀的程序员,十分优秀!