Facebook API 的范围

发布于 2024-11-02 17:29:19 字数 162 浏览 2 评论 0原文

我正在尝试随时随地学习和创建 Facebook API。但是,我在开发者页面上没有找到任何详细指定 Facebook API 范围的页面。我了解可以使用 Graph API 访问公共信息。但同时也明白进一步的访问是可能的,但不确定有多少。

是否可以访问授权应用程序的用户的“编辑新闻提要选项”?

I am trying to learn and create a Facebook API on the go. However, I haven't found any page on the developer pages that specifies the scope of the Facebook API in great detail. I understand public information can be accessed using Graph API. But at the same time understand that further access is possible, not sure how much though.

Is there anyway to access the 'Edit news feed options' of a user that authorizes an application?

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

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

发布评论

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

评论(1

梦言归人 2024-11-09 17:29:20

我不太明白你所说的“范围”是什么意思,但是 Graph API 只不过是一系列 URL,用于通过查询联系 facebook 服务器并以 JSON 对象的形式获取答案。

您可以通过查看此处的 API 参考来开始学习:
http://developers.facebook.com/docs/reference/api/

有适用于您能想到的每种语言的非官方 API,例如 java:http://code.google .com/p/facebook-java-api/,c#: http://facebooksdk.codeplex.com/ 等。

要阅读新闻源,您可以通过以下方式访问: :

https://graph.facebook.com/me/home?access_token=TOKEN(其中令牌是访问令牌)

Fb 将使用类似于下面粘贴的 JSON 对象进行响应。

{
   "data": [
      {
         "id": "11111_1111111111,
         "from": {
            "name": "Name",
            "id": "11111111"
         },
         "message": "SOME_MESSAGE",
         "actions": [
            {
               "name": "Comment",
               "link": "http://www.facebook.com/111111/posts/11111"
            },
            {
               "name": "Like",
               "link": "http://www.facebook.com/11111/posts/11111"
            }
         ],
         "type": "status",
         "created_time": "2011-04-20T20:19:04+0000",
         "updated_time": "2011-04-20T20:19:04+0000"
      },
etc etc etc
],

   "paging": {
      "previous": "https://graph.facebook.com/me/home?access_token=TOKEN",
      "next": "https://graph.facebook.com/me/home?access_token=TOKEN"
   }
}

这样,您就可以使用人员或消息的 ID 来执行新查询,如 FB API 页面中所述:

Facebook 中的所有对象
社交图谱连接到每个
其他通过关系。布雷特·泰勒
是可口可乐页面的粉丝,并且
布雷特·泰勒和阿琼·班克是
朋友们。我们称这些关系为
我们的 API 中的连接。你可以
检查之间的联系
使用 URL 结构的对象
https://graph.facebook.com/ID/CONNECTION_TYPE
为人们提供支持的连接
页面包括:

FB 上的几乎所有信息都可以通过 Graph API 访问,前提是用户向应用程序授权了正确的权限:

http://developers.facebook.com/docs/authentication/permissions/

I don't really understand what you mean by "scope", but the Graph API is not more than a series of URLs to contact the facebook servers with queries and obtain answers in form of JSON objects.

You can start learning by looking at the reference for the API here:
http://developers.facebook.com/docs/reference/api/

There are unofficial APIs for every language you can imagine, for example java: http://code.google.com/p/facebook-java-api/ , c#: http://facebooksdk.codeplex.com/ , etc.

To read the news feed, you can access it by:

https://graph.facebook.com/me/home?access_token=TOKEN (where TOKEN is the access token)

Fb will respond with a JSON object similar to the one pasted below.

{
   "data": [
      {
         "id": "11111_1111111111,
         "from": {
            "name": "Name",
            "id": "11111111"
         },
         "message": "SOME_MESSAGE",
         "actions": [
            {
               "name": "Comment",
               "link": "http://www.facebook.com/111111/posts/11111"
            },
            {
               "name": "Like",
               "link": "http://www.facebook.com/11111/posts/11111"
            }
         ],
         "type": "status",
         "created_time": "2011-04-20T20:19:04+0000",
         "updated_time": "2011-04-20T20:19:04+0000"
      },
etc etc etc
],

   "paging": {
      "previous": "https://graph.facebook.com/me/home?access_token=TOKEN",
      "next": "https://graph.facebook.com/me/home?access_token=TOKEN"
   }
}

Having that, you can use the ID for the person or the message to perform new queries, as explained in the FB API page:

All of the objects in the Facebook
social graph are connected to each
other via relationships. Bret Taylor
is a fan of the Coca-Cola page, and
Bret Taylor and Arjun Banker are
friends. We call those relationships
connections in our API. You can
examine the connections between
objects using the URL structure
https://graph.facebook.com/ID/CONNECTION_TYPE.
The connections supported for people
and pages include:

Almost every information on FB is accessible through the Graph API, provided the user authorized the app with the rigth permissions:

http://developers.facebook.com/docs/authentication/permissions/

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