从Facebook API获取页面创建日期

2024-04-20 09:46:00 发布

您现在位置:Python中文网/ 问答频道 /正文

我已经成功地用Python和JavaScript从Facebook API中获取页面列表、提取数据等,但奇怪的是,我在一些看起来应该很简单的事情上陷入了困境!在

我找到了the documentation for retrieving a page's creation date through the Facebook API。在

然而,我已经尝试了各种方法来让这个工作,我不断地出错。在

在他们的graph explorer里,我试过了

{page-id}?fields=date
{page-id}?fields=day
{page-id}?fields=month, day, year
{page-id}?fields={fieldname_of_type_PageStartInfo}
{app-id}?fields=date
{app-id}?fields=day
{app-id}?fields=month, day, year
{app-id}?fields={fieldname_of_type_PageStartInfo}
...?fields=date
...?fields=day
...?fields=month, day, year
...?fields={fieldname_of_type_PageStartInfo}

其中,我将{app id}替换为应用程序的id,并将{page id}替换为我想要的开始日期的页面的id。上面写着“…”我真的离开了“…”。其中写着{fieldname_of_type_PageStartInfo}我把它放进去了,包括括号(我知道这可能是错的,但我已经绝望了,尝试了一切!)在

所有这些组合都返回了各种错误,包括:

^{pr2}$

我更喜欢JavaScript、Python的解决方案,或者如果可能的话,只使用graphapi浏览器中的URL。谢谢您!在


Tags: ofapiidappfieldsdatefacebooktype