Posts tagged with facebook-marketing-api

In my application I want users to edit their leadgen forms. As far as I know there is no possibility to edit a leadgen form. Simply creating a new leadgen form with the desired changes would result in losing linked data, such as leads.

Therefore, via the UI (Adsmanager) one would copy the leadgen form and make the desired changes which keeps the linked data (leads).

I was wondering if there is a [leadgen_form_id]/copy endpoint? Or how can I edit a leadgen form without losing linked data.

We have a Facebook App created with a dummy User to manage Ads and Audience to which it has access to. Unfortunately it's complicated at the moment to create it under a proper company's User, because we manage many Pages and Clients and there is a lot of burocracy.

In any case, the Access Token associated to this Facebook App works fine and has its live span set to 90 days: the trouble is that after 30 days of the dummy User's inactivity on Facebook, the user get dissociated from the Facebook App. This results in our automated refreshToken call to fail. We have to manually login and re-connect the User to the Application. In fact, the APIs calls we do for our business purpose aren't enough / aren't considered as User's actions: this sound both fair and unintuitive.

Is there a knowkn way or an API call (even as simple as "list your own feed") to keep the User's session active?

Thank you in advance for any tips.

I've encounted a problem. I need to get metrics from Facebook API insights (I'm using version 18) to build my own report. Some of metrics are displayed in Facebook Adsmanager, but not found in API insights. Those metrics are:

I've read through all Facebook Insights doc and call its API by many ways but cannot get the above metrics. So are there other ways to get those metrics either by APIs or from Facebook Adsmanager?

I am facing the same problem as mentioned in this question, Why some ads is not breaking down by link_url_asset, the only difference is that I am pulling data on "Campaign" level.

Since the question was asked long back and there's no answer, so posting it again with my wrapper question.

When I am not applying breakdown, I am getting X number of impressions. But when I apply breakdown on link_url_asset, the breakdown happens but when I add the impressions, the sum does not match with X (less than X).

The reason I want to do breakdown is because I want to pull the utm_campaign value from the website_url attribute in link_url_asset.

I am hitting following endpoint with the params -

/GET https://graph.facebook.com/v19.0/act_{ACCOUNT_ID}/insights?level=campaign&fields=account_name,account_id,campaign_name,impressions,spend,actions&time_range={"since":"2024-04-07","until":"2024-04-07"}&access_token=${ACCESS_TOKEN}&filtering=[{field: "action_type",operator:"IN", value: ['link_click']}]&breakdowns=link_url_asset&use_account_attribution_setting=true 

I am not able to figure out from the Facebook documentation that what am I missing here.