Elvis Oliveira
Elvis Oliveira

Reputation: 949

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.

Upvotes: 0

Views: 1529

Answers (1)

David
David

Reputation: 1436

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

Upvotes: 5

Related Questions