如何使用Graph API抓住Facebook Note的内容? [英] How do I grab the contents of a Facebook Note using the Graph API?

查看:95
本文介绍了如何使用Graph API抓住Facebook Note的内容?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图使用我生成的长期访问令牌访问页面的注释。我尝试访问以下两个端点:

I'm trying to access the notes of a page using a long-lived access token I've generated. I tried accessing the following two end-points:

https://graph.facebook.com/<note_id>?access_token=<token>
https://graph.facebook.com/v1.0/<note_id>?access_token=<token>

但都会返回以下错误消息:

but both returns the following error message:

{
   "error": {
      "message": "(#12) notes API is deprecated for versions v2.0 and higher",
      "type": "OAuthException",
      "code": 12
   }
}

我尝试使用从Graph API Explorer生成的访问令牌获取笔记,它的工作原理很好;但这是一个短暂的令牌,只持续了60分钟。如错误所述,对于版本2.0及更高版本,不推荐使用注释 API;这是否意味着我无法使用图形API访问笔记?

I tried getting the notes using the access token I generated from the Graph API Explorer, and it works perfectly; but it's a short-lived token that lasts only 60 minutes. As the error says, the notes API is deprecated for versions 2.0 and higher; does this mean I can no longer access the notes using the graph API?

我的问题只是:如何获取笔记内容,和PHP中的长期访问令牌?(如果可能,不使用任何SDK)

My question is just: how do I get the note content given a note ID, and a long-lived access token in PHP? (without using any SDKs if possible)

注意:我不是在寻找代码来复制粘贴。我一直在努力工作几个小时,以使其工作,但无济于事。只是想弄清楚怎么样。任何帮助将不胜感激!

Note: I'm not looking for code to copy-paste. I've been trying for hours to get this to work but to no avail. Just trying to figure out "how". Any help would be greatly appreciated!

推荐答案

https://developers.facebook.com/docs/apps/changelog


/ me / notes不再可用,以及user_notes权限。

/me/notes is no longer available, along with the user_notes permission.

不幸的是,注释的API已完全删除,只能使用到2015年4月底,只有在2014年4月底之前创建的应用程序。

Unfortunately, the API for notes got removed completely and can only be used until end of April 2015, and only with an App created before end of April 2014.

在引用中也可以看到: https://developers.facebook.com/docs/graph-api/reference/v2.1/注释

This is also visible in the reference: https://developers.facebook.com/docs/graph-api/reference/v2.1/note


此文档是指在Graph API v1.0之后删除的功能。

This document refers to a feature that was removed after Graph API v1.0.

它只能在API资源管理器中工作,如果您选择API资源管理器应用程序,因为该应用程序仍然可以使用v1。 0。

It only works in the API Explorer if you select the API Explorer App, because that App can still use v1.0.

这篇关于如何使用Graph API抓住Facebook Note的内容?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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