Facebook Marketing API asset access suddenly denied
Asked Answered
C

6

12

I maintain a couple of Facebook Marketing API PHP integrations. They pull data from ad campaigns into a dashboard. Since these are for specific clients to access their own data, I keep them in Dev mode as I don't want them publicly visible. At 10 AM this morning, the API suddenly started refusing connections to both apps. The error I get is:

"error_user_title": "Specific asset cannot be accessed in dev mode app",

"error_user_msg": "Your query touched some business assets which cannot be viewed in dev mode app. Please make sure all business assets the dev mode app is accessing are either with in the same business as the app, or under the caller if app doesn't have a business. Dev mode app and accessing asset are not owned by same business",

I went through the app settings and the relevant business is still associated with the app. I verified all the credentials and it all appears good. This happened simultaneously across two similarly-configured apps.

Nothing changed about my code, and as this happened two two different apps and two different accounts simultaneously, I assume Facebook just changed something.

Anyone know how to fix this?

Conglomerate answered 3/6, 2019 at 17:57 Comment(5)
Same, at same time as you. Maybe something going on with Facebook? I started experiencing this error around 10am PST and have been continually experiencing it since then.Seda
Just a note, go into facebook admin, go into settings for the app where you handle the api key and all that, associate your app with your business id, or let me know if you had already done that. i had not done that, i just did that now, and maybe that was it.Seda
I'd already associated the app with the business id back when I set up the app, and I checked that it was still associated when the errors started. Wasn't the issue for me.Conglomerate
I had the same issues begin at 10 AM PST today.Jillene
Looks like it's resolved itself for me, as other commenters have posted. It's working again on both my apps.Conglomerate
M
8

I was experiencing the same thing. As Pieter suggested, it look like it was a bug and has now been resolved. My app is working fine now.

Myasthenia answered 3/6, 2019 at 21:27 Comment(0)
D
3

Seems to be an issue with Facebook as I'm currently experiencing the same thing. I'm not using PHP though, using Node on this side.

Dutra answered 3/6, 2019 at 18:39 Comment(0)
C
3

I just had the same issue. I was able to resolve it by changing the status of the app from 'Off - In Development' to 'On - Live'. After going live I was not able to find my app by searching for it. If that changes because of some delay on Facebook's end I'll update this.

Off - In Development

On - Live

Update: According to https://developers.facebook.com/docs/apps/managing-development-cycle/ it doesn't look like your app can be found unless you submit it to the App Center.

Concubine answered 3/6, 2019 at 19:51 Comment(0)
J
2

I hope this works for some of you.

1) I was able to resolve the problem navigating to the following domain containing the app settings.

https://developers.facebook.com

2) Under "My Apps", select your app (mine was in dev mode).

Developer Home Page

3) Then select the "advanced" settings in the left-hand margin. See image below.

Advanced Settings

4) On the next page, I scrolled down to the Business Manager subsection and selecting my company. Saved the changes on the page. At the time my Facebook Account was an Admin for this business.

[Business Manager Example[2]

Then ran my Python Script. Everything worked afterwards.

My app was in dev mode the entire time as we only use it internally.

Jillene answered 3/6, 2019 at 20:46 Comment(0)
S
1

Ok, here is my current understanding of the problem. You have a facebook business id for which you can create multiple apps. When creating an app it defaults to a generic developer app that is not associated with your facebook business id.

You are running queries (e.g. graph rest api requests) that were accessing data objects associated with your business id from your app that is not associated with your business id.

This basically means you need to get your dev app associated with your business id in order to do those graph calls.

You can do this from the facebook marketing api admin area. Once you associate then you need to do all the request like setup a privacy policy, get it approved, setup proper permissions, etc. Then you should be able to continue as before.

So my best guess is fb decided to just suddenly lock down generic app requests against data that belongs to a particular business id.

Seda answered 3/6, 2019 at 19:3 Comment(5)
You mean like this? imgur.com/sn8lI00 I've already got the values put in there. You mention updating the privacy policy, getting it approved, etc. Maybe that is the issue? These apps are not intended to ever be public so they're in dev mode.Conglomerate
Hmm, on my colleague's screen there was a drop down menu, where we had to set the app to the name of our business, to associate it. This menu was not configured. Once I did it, I started getting slightly different errors (e.g. I got a 403 instead of a 400, this time about needing business_manager permissions).Seda
That sounds promising, but I'm not seeing such a dropdown menu, unless you mean the autocomplete menu that shows up when you start typing in the boxes in the above screenshot. Any chance you could describe the exact place you found that menu?Conglomerate
Unfortunately no, it is his responsibility so I did not get a good look. Unfortunately am also switching to work on something else for now.Seda
Damn. OK well thanks for pointing the way to a possible solution.Conglomerate
M
1

Same here. But it looks like a bug has been opened that can be followed: https://developers.facebook.com/support/bugs/2469410236669471/?disable_redirect=0

Mark answered 3/6, 2019 at 20:31 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.