即使帖子是公开的,Facebook Graph API返回'false' [英] Facebook Graph API returns 'false' even though post is public

查看:123
本文介绍了即使帖子是公开的,Facebook Graph API返回'false'的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的应用程序中,大多数公开帖子在通过Graph API访问时似乎返回false。

In my application, most public posts seem to return 'false' when accessed via the Graph API.

示例: https://graph.facebook.com/1543370206_2215254431220?access_token=XXXX

该帖子是公开的可见,但查询上述总是返回false。

That post is publicly visible, yet querying the above always returns false.

根据StackOverflow上的类似问题,我尝试使用应用程序访问令牌和几个不同的oAuth 2.0用户访问令牌与offline_access,但没有成功。

As per similar questions on StackOverflow, I've tried using both an application access token and several different oAuth 2.0 user access tokens with offline_access, but without success.

我也尝试使用profileid_postid ID格式(如上)和postid格式(https://graph.facebook)访问它。 com / 2215254431220?access_token = XXXX),但没有运气。

I've also tried accessing it using the profileid_postid ID format (as above) and postid format (https://graph.facebook.com/2215254431220?access_token=XXXX), but no luck.

我还在24小时后重试,只是为了确保我没有超过任何API限制。

I've also retried after 24 hours, just to be sure I'm not exceeding any API limits.

我已经测试了超过1,000个公开帖子(我知道他们是公开的,因为我从Grap h API使用搜索方法,但我也在浏览器中做了一些随机抽样,以确保)。 75%返回false(不管我是否使用了应用程序访问令牌或用户访问令牌)。

I have tested more than 1,000 public posts (I know they're public because I obtained them from the Graph API using the search method, but I've also done some random sampling in a browser to be sure). 75% returned false (regardless of whether I used an application access token or a user access token).

推荐答案

已经解决了它。

返回false的帖子不是public。他们似乎对任何Facebook用户都可见,无论他们是否是作者的朋友。但是,如果您没有登录Facebook,则无法看到它们。

The posts which were returning false aren't 'public' as such. They seem to be visible to any Facebook user, regardless of whether they're friends with the author. However, if you're not logged into Facebook, you can't see them.

成功的帖子是真正公开的。他们中的大多数属于公司等等,您可以看到他们是否登录了Facebook。

The posts which were succeeding were truly public. Most of them belonged to companies etc and you could see them whether you were logged into Facebook or not.

我猜图形API可以区分这两种类型的可见性例如Facebook上的每个人和互联网上的每个人。我看过我的隐私设置,无法弄清楚这是如何完成的。

I guess the Graph API makes a distinction between these two types of visibilities e.g. 'Everyone on Facebook' and 'Everyone on the Internet'. I had a look in my privacy settings and can't figure out how this has been done.

无论如何,Graph API文档中没有详细介绍。也不是返回假一个优雅的方式来处理这个错误。允许我通过搜索查看帖子也不一致,但不直接查询对象。

Regardless, this isn't well-documented in the Graph API docs. Nor is returning 'false' an elegant way to handle this error. Nor is it consistent to allow me to see the post via search, but not query the object directly.

这篇关于即使帖子是公开的,Facebook Graph API返回'false'的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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