Get comments from facebook ads (marketing)

Digital Marketing Facebook Marketing API 2 years ago

0 1 0 0 0 tuteeHUB earn credit +10 pts

5 Star Rating 1 Rating

Posted on 16 Aug 2022, this text provides information on Facebook Marketing API related to Digital Marketing. Please note that while accuracy is prioritized, the data presented might not be entirely correct or up-to-date. This information is offered for general knowledge and informational purposes only, and should not be considered as a substitute for professional advice.

Take Quiz To Earn Credits!

Turn Your Knowledge into Earnings.

tuteehub_quiz

Answers (1)

Post Answer
profilepic.png
manpreet Tuteehub forum best answer Best Answer 2 years ago
_x000D_ You can't get comments nor reactions from Marketing Insights directly. I stand corrected. If you have access to an ad_account insights, then you can use Marketing API to get a post's comments directly. Thanks @lamxung55 Let's say you have and ad_id of 123000000 If you have a token with ads_management or ads_read permission, you can make a request to the Marketing API such as /123000000?fields=creative.fields(effective_object_story_id),insights.fields(actions) This will give you the effective_object_story_id which is the object_id of the post ({page_id}_{post_id}), and its insights including its actions broken down by action type. For example: { "creative": { "effective_object_story_id": "456000000_789000000", "id": "123000000" }, "insights": { "data": [ { "actions": [ { "action_type": "comment", "value": "12" }, { "action_type": "like", "value": "2" }, { "action_type": "post", "value": "3" }, { "action_type": "post_reaction", "value": "29" }, { "action_type": "video_view", "value": "558" }, { "action_type": "page_engagement", "value": "604" }, { "action_type": "post_engagement", "value": "602" } ], "date_start": "2017-08-14", "date_stop": "2017-08-20" } ], "paging": { "cursors": { "before": "xxx", "after": "xxx" } } } } The effective_object_story_id (so, post_id) is 456000000_789000000. You can then query the comments edge of the post adding summary=true as a parameter. This endpoint is public for common posts (however, it won't work for non public posts) /456000000_789000000/comments?summary=true Which will respond with an object like { "data": [ ], "paging": { }, "summary": { "order": "chronological", "total_count": 50, "can_comment": true } } This means the post has had 50 comments, of which 12 were made through a paid action.

No matter what stage you're at in your education or career, TuteeHub will help you reach the next level that you're aiming for. Simply,Choose a subject/topic and get started in self-paced practice sessions to improve your knowledge and scores.