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

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

问题描述

我正在尝试编写一个程序,用于追溯一个给定的用户的状态(根据状态,我的意思是他发布的内容,他写的任何东西,因为我最感兴趣的是文本状态)

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://开发人员之间的区别。 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

(另一件我注意到的情况是状态需要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)

谢谢

推荐答案

这是记录在用户对象。而且,从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 包括用户可以在自己的配置文件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.

默认情况下,每个返回的帖子仅包含故事字段,其中包含该帖子的文字说明。但是您可以使用?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 returns only status updates posted by the user on their own profile. [removed after Graph API v2.3]

/ {user-id} / home 返回由用户和他们的朋友,即您通常在Facebook的新闻Feed上找到的内容。 [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中的Feed,帖子和状态有什么区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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