Posts tagged with web-scraping

I've tried getting
graph.facebook.com/v20.0/1*************3_7*************1/comments, where
1*************3 is a valid user id, and
7*************1 is a valid (and public) post id.

Unfortunately, the Graph API Explorer shows an OAuthException:

{   "error": {     "message": "Unsupported get request. Object with ID '1*************3_7*************1' does not exist, cannot be loaded due to missing permissions, or does not support this operation. Please read the Graph API documentation at https://developers.facebook.com/docs/graph-api",     "type": "GraphMethodException",     "code": 100,     "error_subcode": 33,     "fbtrace_id": "A*********************Z"   } } 

How could I get all the comments of a user's public Facebook post?

I'd prefer a Graph API (or other official Meta tool) solution.

But I'm open to other approaches too.

I am using /ads_archive docs search endpoint to search for Facebook archived ads. It returns data in JSON format. Easy to parse and to work with. However, it only contains short info about Ad.

More detailed info is under ad_snapshot_url of format https://www.facebook.com/ads/archive/render_ad/?id={AD_ID}&access_token={ACCESS_TOKEN}. You need to go to this URL and parse HTML, which is very uncomfortable. Info is stored inside javascript objects. Not easy to work with.

Is there any Facebook API alternative for ad_snapshot_url that returns data in JSON format?

Tried to put Accept-Language: application/json into request headers. Tried different formats like: https://graph.facebook.com/v19.0/ads_archive/{AD_ID} https://graph.facebook.com/v19.0/ads_archive/ad/{AD_ID} https://graph.facebook.com/v19.0/ads_archive/details/{AD_ID}

No luck.

I would like to daily monitor the optimization score of Google Ads. It is the metric shown below on the printscreen.

Does anyone know a method ( via API, Supermetrics, or other script ) to return this value to a Google Spreadsheet? I've been searching on Google Ads API but did not find anything so far, and I am curious if anyone got a solution for this.