使用 Facebook API 搜索不常见短语

发布于 2025-01-04 09:57:21 字数 276 浏览 4 评论 0原文

是否可以获得不常见短语(例如 URL)的结果?

我尝试对我的短语进行编码。我使用 PHP urlencode() 函数尝试查找包含“http://www.google.com”的帖子,

https://graph.facebook.com/search?q=http%3A%2F%2Fwww.google.com&type=post

但我得到的是:

{
   "data": [

   ]
}

Is it possible to obtain results for non-common phrases (such as URLs for example) ?

I tried to encode my phrases. I used PHP urlencode() function to try to look for posts containing 'http://www.google.com'

https://graph.facebook.com/search?q=http%3A%2F%2Fwww.google.com&type=post

however all I get is:

{
   "data": [

   ]
}

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

沙与沫 2025-01-11 09:57:21

当我去:
https://graph.facebook.com/search?q=http%3A%2F%2Fwww.google.com&type=post

我明白
{
“数据”: [
{
“id”:“100002667502867_210058145759767”,
“从”: {
“姓名”:“阿莱西奥·迪耶斯”,
“id”:“100002667502867”
},
"message": "我刚刚兑换了这笔交易!查看一下:http://www.google.com" ,
“类型”:“状态”,
“应用”: {
"name": "SpotOnCo 应用程序",
"canvas_name": "spotonco-app",
“命名空间”:“spotonco-app”,
“id”:“132159653549822”
},
"创建时间": "2012-02-12T00:53:28+0000",
“更新时间”:“2012-02-12T00:53:28+0000”
},
{
"id": "100001565919790_296841673711361",
“从”: {
“姓名”:“维克多·阿苏夸”,
“id”:“100001565919790”
},
"message": "\u003Ca href=\"http://www.google.com\"> 单击此处单击此处\u003C/a>",
“类型”:“状态”,
“应用”: {
“名称”:“黑莓”,
"canvas_name": "viabberry",
“命名空间”:“viabberry”,
“id”:“111498688870155”
},
"创建时间": "2012-02-11T23:46:43+0000",
“更新时间”:“2012-02-11T23:46:43+0000”
},
...

当我转到同一链接添加访问令牌时,我得到:

{
“数据”: [
]
所以

这里的故事的寓意是:不要将 &access_token=VALID_ACCESS_TOKEN 添加到查询中,您将访问公共数据。 ;)

When I go to:
https://graph.facebook.com/search?q=http%3A%2F%2Fwww.google.com&type=post

I get
{
"data": [
{
"id": "100002667502867_210058145759767",
"from": {
"name": "Alessio Diesse",
"id": "100002667502867"
},
"message": "I just redeemed this deal! Check it out: http://www.google.com",
"type": "status",
"application": {
"name": "SpotOnCo App",
"canvas_name": "spotonco-app",
"namespace": "spotonco-app",
"id": "132159653549822"
},
"created_time": "2012-02-12T00:53:28+0000",
"updated_time": "2012-02-12T00:53:28+0000"
},
{
"id": "100001565919790_296841673711361",
"from": {
"name": "Victor Asuquo",
"id": "100001565919790"
},
"message": "\u003Ca href=\"http://www.google.com\"> click here to click here \u003C/a>",
"type": "status",
"application": {
"name": "BlackBerry",
"canvas_name": "viabberry",
"namespace": "viabberry",
"id": "111498688870155"
},
"created_time": "2012-02-11T23:46:43+0000",
"updated_time": "2012-02-11T23:46:43+0000"
},
...

When I go to the same link adding an access token, I get:

{
"data": [
]
}

So the moral of the story here is: don't add &access_token=VALID_ACCESS_TOKEN to the query and you'll be accessing public data. ;)

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文