开发者

What is the difference between feed, posts and statuses in 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)

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

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

Thanks


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 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 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 returns the posts created by friends and shared on the users's profile.

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.

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

The following endpoints are deprecated:

  • /{user-id}/statuses returns only status updates posted by the user on their own profile. [removed after 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]


I've found one more difference between /statuses and /posts. /statuses are just text statuses (it doesn't include shared links)


Feed - https://graph.facebook.com/me/feed - gives you the user's feed - meaning the posts he sees when he is visiting facebook (friends important posts) - notice that facebook filters only things it's algorithm marks as significant to the user and not everything.

Status - what the user posts on his own wall

Posts - what the user posts - including on other people's walls

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜