Facebook Graph API 中的提要、帖子和状态之间有什么区别? [英] What is the difference between feed, posts and statuses in Facebook Graph API?

查看:20
本文介绍了Facebook Graph API 中的提要、帖子和状态之间有什么区别?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试编写一个程序来检索给定用户的状态"(状态是指他自己发布的内容,他写的任何内容,因为我最感兴趣的是文本状态)

I'm trying to write a program that retreives a given user's "statuses" (and by statuses I mean the things he posted himself, anything he wrote as I'm mostly interested in textual statuses)

我无法弄清楚此处与文档的区别 https://developers.facebook.com/docs/reference/api/user/ 所以我不知道使用哪种连接类型;供稿、帖子或状态

I cannot figure out the difference from the documentation here https://developers.facebook.com/docs/reference/api/user/ so I don't know which connection type to use; feed, posts or statuses

(我注意到的另一件事是 statuses 需要一个 access_token,而其他 2 个需要 access_token 仅用于非公开内容)

(Another thing I noticed is that statuses requires an access_token while the other 2 require the access_token only for non public stuff)

谢谢

推荐答案

这被记录在 User 对象.而且,从 Graph API v2.6 开始,基本上有一个主要端点,您可以从中获取用户的帖子.

This is documented on the User object of the Graph api. And, as of the Graph API v2.6, there is basically one main endpoint from which you get posts from a user.

  • /{user-id}/feed 包括用户可能在他们自己的个人资料提要上看到的所有内容;这包括例如共享链接、签到、照片和状态更新.这包括朋友在用户个人资料上发布的帖子.

  • /{user-id}/feed includes all the things that a user might see on their own profile feed; this includes, e.g., shared links, checkins, photos and status updates. This also includes posts made by friends on the user's profile.

以下端点返回上述的子集:

The following endpoints return subsets of the above:

  • /{user-id}/posts 返回用户创建的帖子(在他们自己的个人资料或朋友的个人资料上),它可能包含任何类型的内容,例如作为共享链接、签到、照片和状态更新.

  • /{user-id}/posts returns the posts created by the user (on their own profile or the profile of a friend), and it may include any kind of content such as shared links, checkins, photos and status updates.

/{user-id}/tagged 返回由朋友创建并在用户个人资料上分享的帖子.

/{user-id}/tagged returns the posts created by friends and shared on the users's profile.

默认情况下,每个返回的帖子仅包含带有帖子文本描述的 story 字段.但是您可以使用 ?fields=... 参数来请求尽可能多的 根据需要发布字段.

By default each returned post only includes the story field with a textual description of the post. But you can use the ?fields=... parameter to request as many Post fields as you want.

您需要 user_posts 权限才能使用其中任何一个.

You'll need the user_posts permission for any of these to work.

不推荐使用以下端点:

  • /{user-id}/statuses 返回 用户在他们自己的个人资料上发布的状态更新.[Graph API v2.3 后移除]

  • /{user-id}/statuses returns only status updates posted by the user on their own profile. [removed after Graph API v2.3]

/{user-id}/home 返回用户及其朋友创建的所有帖子的流,即您通常在 Facebook 的新闻提要"上找到的内容.[Graph API v2.3 后移除]

/{user-id}/home returns a stream of all the posts created by the user and their friends, i.e. what you usually find on the "News Feed" of Facebook. [removed after Graph API v2.3]

这篇关于Facebook Graph API 中的提要、帖子和状态之间有什么区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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