We are using page_id/promotable_post to get the post made by the brand. This endpoint returns both promoted posts and unpublished or "Dark" posts.
We are interested in getting only the unpublished/dark post and not the promoted post since those come via the real-time webhook also.
We can see the documentation mentioning the following two parameters,
include_inline=true&is_published=false
Would it be right to assume that specifying this would stop promoted posts?
Related
I am working on an old codebase which includes a few fb api calls.
One of them is hitting /posts?ids=userId1,userId2...
When searching through the facebook api reference this endpoint is nowhere seen though.
https://developers.facebook.com/docs/graph-api/reference
You can try it in the fb api explorer though, for example with:
posts?ids= 89562268312
So my question, is this still a valid endpoint and does documentation exist?
Update:
according to Retrieving public posts from multiple Facebook pages at the same time using the Graph API this was once documented under the point selection, but it seems to be gone.
answering myself here in case someone stumbles over this, its not a direct endpoint, but as stated under
https://developers.facebook.com/docs/graph-api/advanced#largerequests
Multiple ID Read Requests
You can make a single GET request that retrieves multiple nodes by using the ?ids endpoint with the object IDs of those nodes. For example, to lookup the Facebook Developers page and the current session user in a single request, you could use the following Graph API call:
GET graph.facebook.com
/photos?ids={user-id-a},{user-id-b}
I'm trying to subscribe to the promotable_posts endpoint of the Facebook page to get updates for unpublished and hidden posts ("dark posts"). According to Facebook it should be possible to subscribe to that endpoint: https://developers.facebook.com/docs/pages/realtime#data
But that endpoint is not listed on https://developers.facebook.com/apps/[APP_ID]/webhooks/ and I can't add the subscription of the endpoint via the API either. It's working for endpoints like feed.
How can I subscribe to that endpoint? And how can I get hidden posts? Normally I would use https://graph.facebook.com/[PAGE_ID]/promotable_posts?include_hidden=true&access_token=... to get those posts when I'm polling, but I can't tell Facebook to include hidden posts when I subscribe to an endpoint.
The Facebook documentation is wrong: You don't have to subscripe to "promotable" posts to get unpublished posts and you don't have to do anything else to get "hidden" posts.
is_hidden
If this post is marked as hidden (Applies to Pages only)
From Facebook documentation here.
This flag tells you if the posts are hidden also known as unpublished or "dark posts". Basically it's a post that is shown in public feed but not in the page feed.
However, when you make a call to FB Graph API you still get all the posts, just add this flag in your request in order to filter them later.
The best approach would be pull the data from the api, and manage it in your side, since there is no way to filter them on your calls.
I'd like to use the GraphAPI and Webhooks to subscribe to a user's activity feed and extract information such as metadata and stats about the shared posts they like. (Yes, I am well aware of the privacy concerns and this will be handled extremely carefully.)
The closest question I could find is here:
Extract Links from Facebook activity feed
The other answers are not relevant, as they either discuss the old FQL or plugins or are specific to Pages.
I've been reading the GraphAPI documentation and the User Likes information only relates to the Pages they like (which doesn't change much). So this is a subset of the info needed - I need likes for Posts, not just Pages.
What I am really interested in is the objects to which a given user has reacted. You can easily see the reactions for everyone to a given post with a GET /v2.8/{post-id}/reactions HTTP/1.1 call. But this is "reactions by post" and I need "reactions by user".
The best solution I can figure out so far is to subscribe to their feed with a webhook and then collect a list of object IDs and then subscribe to their reactions for a certain period and filter by the user. This is not ideal or very efficient as it requires a fair number of subscriptions, and also only accounts for posts in the user's feed and not other posts they might have stumbled upon via some other means.
So - how to extract all User Like info?
I'm trying to read the ads comments using the Facebook Ads API v2.8. I have reached all of my campaigns and ads, but I didn't find in the docs the path for the comments.
I've searched over internet and everyone says that it's possible, but, or the post is too old or they dont explain properly (maybe I didn't understand properly).
Obs.: I'm using CURL, but if you have some JAVA code, it's alright for me.
Ads are merely a wrappers around posts (in most cases). Typically these posts can be unpublished, but you can promote published posts too.
All the social activity like likes/reactions, comments or shares happen at the post, not at the ad. When you realize this, then it's clear the comments need to be read from post itself.
To get post ID from your ad ID you can use following endpoint
/<ad_id>?fields=creative{effective_object_story_id}
From there you take the effective_object_story_id, which is your post's ID (you can even open https://facebook.com/<post_id> in your browser)
The post's comments can be accessed on following endpoint
/<post_id>/comments
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/reference/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