只使用Graph API或FQL的链接搜索Facebook所有公开帖子? [英] Searching Facebook all public posts only for posts with links using Graph API or FQL?

查看:98
本文介绍了只使用Graph API或FQL的链接搜索Facebook所有公开帖子?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以使用Graph API或FQL搜索Facebook所有公开帖子的链接?

Is it possible to search Facebook all public posts only for posts with links using the Graph API or FQL?

我尝试一下
https://graph.facebook.com/search?q=watermelon&type=post
但无法理解...

I tried a bit with https://graph.facebook.com/search?q=watermelon&type=post but couldn't figure it out...

推荐答案

此查询结束:

https://graph.facebook.com/search?q=http:&type=post&fields=link

qparam说只返回其消息中包含字符串http:的帖子,这给了一个很好的第一切,但仍然让一些通过没有真正的链接。然后,您可以浏览响应,并丢弃任何不包含链接字段的结果。如果您关心的是链接本身,那么fields = link表示只返回id,created_at和链接字段,并使查询更快一些。

the "q" param says "only return posts whose message contains the string 'http:'", which gives a good first cut, but still lets some through without real links. You can then walk through the response and throw away any results that don't contain a 'link' field. If all you care about is the link itself, then "fields=link" says "only return the id, created_at, and link fields," and makes the query go a bit faster.

看看,似乎某些URL不会变成链接 - 例如bit.ly网址。所以也许你想得到消息并自己解析,例如

Looking it over, it appears that certain URLs do not turn into links -- e.g. bit.ly URLs. So maybe you want to get the message and parse it yourself, e.g.

https://graph.facebook.com/search?q=http:&type=post&fields=link,message

你可能还想做在https:上搜索以获取这些URL。

You may also want to do a search on 'https:' to get those URLs as well.

这篇关于只使用Graph API或FQL的链接搜索Facebook所有公开帖子?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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