Posts tagged with facebook-graph-api

I've scoured through Graph API documents and their community forums, but I failed to find what I'm looking for.

I have page_id and post_id of a post that's an ad on Facebook, and I'd like to know the ad_account_id that is used to advertise it, or at least the campaign_id that the post belongs to.

I know the other way around that I could get post id from tracking_specs fields in act_<ad_account_id> endpoint, but is there anyway to get it backward?

Thank you in advance.

I am using below facebook api to exchange access token for long lived token

curl -i -X GET "https://graph.facebook.com/{graph-api-version}/oauth/access_token?       grant_type=fb_exchange_token&               client_id={app-id}&     client_secret={app-secret}&     fb_exchange_token={your-access-token}"  

But response is missing "expires_in", though FB documentation https://developers.facebook.com/docs/facebook-login/guides/access-tokens/get-long-lived/ sample response shows expiry field.

Is this a bug or there is no expiry on fb_exchange_token or i have to assume token will expire in 60 days?

I am implementing the On Behalf Of flow as described here.

After Step 2's call to /<CLIENT_BM_ID>/access_token?scope=<scopes>&app_id=<APP_ID>&access_token=<PARTNER_BM_ADMIN_SYSTEM_USER_ACCESS_TOKEN>, I expect my app's system user Id to show up under the client's System Users (under Business Settings).

However, this never happens even though Step 2 returned the access_token as specified by the document.

How do I create a system user under the client's business manager?

When I call /me/accounts with the access token of the system user I created, it returns a page which I have access to (the one I connected in Step 4. However, making calls using the page_token retrieved result in the error:

"Cannot call API for on behalf of user :

The app I'm using is a test app.

My main question is how do I give my system user access to the client's assets?

Recently facebook made some changes to their api and depricated the "Groups API". We used it to add weekly a post to our group in an automated way. This ofc stopped working.

Now i have tried to read up on some documentation but was not able to even do a call towards a group.

Some information we found: Blogpost facebook v19 & Discussion on facebook community

Ps it works for pages. But i cant transform my group to a page because it needs to be private.

Any help would be really appreciated. Thx

"message": "(#49101) The app must have credit partition permission or the receiving business must be a child business manager of the extended credit owner with business management permission",

What exactly means "credit partition permission" and how i can get it to my Meta App?

Thanks in advance

I'm getting this error (#49101) when i'm trying to allocate Credit to a BM via API "message": "(#49101) The app must have credit partition permission or the receiving business must be a child business manager of the extended credit owner with business management permission".

I was expecting to be allowed to allocate credit but seems like i need this kind of permission now.