Reading Facebook Dark Posts through Graph API - facebook

Darks posts are promoted unpublished posts on facebook. Basically it's a marketing tool to post ads. Thing is when a person comments on a dark post it does not show up in their notifications.
Is there an API call to show the comments written to Facebook Dark posts? I have tried /promotable_posts?include_hidden=true and others but have not found a syntax that pulls up the dark posts let alone the comments associated with them. Any Help would be appreciated.
(I have done something similar for public posts so I am familiar with calling and testing the facebook API.)

For the new versions of Graph API
/{page-id}/ads_posts?include_inline_create=true
You'll get all ads posts, Dark Posts also included ;)

You were almost there, just that because of unclear Facebook documentation, you were unable to find it. In the documentation, just below include_hidden is an include_inline option which is described as
Used with the promotable_posts edge only. Filters by whether the post was created inline via object_story_spec in the Ads API. This used to be called is_inline
/promotable_posts?include_inline=true
On calling this endpoint, you get all the dark posts of the page. This end point returns the dark posts even if you do not have the ads_management scope in your page access token.

Related

Instagram dark posts, using api to read info and do operations

my company is trying to make interactions with instagram dark posts(It is when you create an ad to target specific people, unpublished posts like facebook dark posts). I have searched nearly all of documentations and I am noting what I have found.
There is Marketing api in facebook Marketing Api Link
There is a link I have taken from a php scraper "www.instagram.com/p/{short_code}/?__a=1"
Option 2 is giving likes and comments but I think it is limited. There is another link with "/graphql?queryid=123123" that gives comments.
And another thing is I have not seen anything to post a comment to a dark post except Marketing Api.
My question is how can I do interactions with dark posts in the most efficient way?
You can use normal /comments edge to retrieve comments from the post id. and POST to create comments on them.
It would work same as engagement on normal posts. Once you have the instagram dark posts with you.
One way to poll dark posts are:
act_{pageId}/ads would return all the ad groups. and you can filter only Insta post by checking weather effective_instagram_story_id exists in creative, and lookup the posts by id lookup via fetch object endpoint.

Facebook Ads API - Read Comments

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

Facebook Like Box - Posts by others not appearing

I am trying to implement the Facebook like box onto my website to show posts by others onto my Facebook page, however it is only showing a feed of the posts the page has made to its timeline and not the posts of other Facebook users.
I'm not sure how I can get this to happen? I'm not bothered about having the page's posts appear but I definitely want other's posts to appear in the feed.
Any help would be greatly appreciated!
Afaik the Plugin only shows posts "by the Page", so that is intentional. Think of it this way: If you get many User postings and only write a few Page postings, your Page postings would just not be very visible in the plugin.
You can only use the "force_checkin" parameter of the plugin to show checkins of friends, see Facebook docs: https://developers.facebook.com/docs/plugins/like-box-for-pages
If you want to get the posts of Users on a Page, you would have to use the Graph API: https://developers.facebook.com/docs/graph-api/reference/v2.1/page/feed
The docs include some example code for most relevant languages and you will get User posts too. Of course you have to design it on your own, you just get data from the API.

Get user's detailed newsfeed(wall) posts in Facebook

I would like to build a project to know users' behavior when they surf facebook website, especially the advertisements showing in their timeline wall. I have learned the basic idea of facebook graph api, knowing how to access the users' information and their feeds. However, I found that the feeds returned by facebook graph api is not "exactly" what user really see when they open facebook url in their browser. First, in graph api, it doesn't show the advertisements posted by sponsors. Second, the feeds returned by facebook api seem only regarding to my own posts(e.g. the photo tagging me, the posts tagging me). So, I would like to know how to access these information to rebuild a testbed that looks like exactly same as the real facebook website to record people reaction to it and continue my research?
Any idea is welcome ^^
This isn't really possible or rather I don't know any API (Facebook/Twitter/etc) that would do this to their third-party developers. The point of the API is to pull user data, not ads.
Also it sounds like you are using /me/posts or/me/feed instead of /me/home

Programmatically posting Facebook comments

My application has obtained publish_stream permissions for a Facebook user.
I'd like to allow the user to post comments for a target URL directly from my mobile application, rather than opening up an embedded browser that then shows the Comment Box plugin. That is, the user doesn't necessarily want to post the link to their feed -- rather they want to participate in any Facebook comment discussion that surrounds that URL.
Naturally, I can read the comments for any URL via the Graph API (eg: a techcrunch article) but I do not know how, or if I can add comments to an arbitrary URL programmatically.
Would love to hear any other suggestions or workarounds as well. My hope is to piggy back on Facebook comments to allow my users to have a conversation surrounding URLs of interest to them. If at all possible, I'd also prefer to use Facebook, though I can see using Disqus or similar services would be another possibility.
Use graph api, demo comments here
make POST to
http://graph.facebook.com/comments/?ids=http://techcrunch.com/2011/07/22/big-surprise-the-ipad-trumps-android-tablets-at-the-office/
with field message and value "yourmessage"
I genuine Facebook API bug.
Cannot comment via Graph API on Comments Plugin (Probably try Legacy API)
Graph API