Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Facebook Ads does not load ad accounts in navigator #23

Open
spijs opened this issue Feb 29, 2020 · 4 comments
Open

Facebook Ads does not load ad accounts in navigator #23

spijs opened this issue Feb 29, 2020 · 4 comments

Comments

@spijs
Copy link

spijs commented Feb 29, 2020

I don't see any ad accounts when trying to connect to the data source. When in Facebook adsmanager I see at least 2 personal and one business account. Have I misunderstood any concepts here or could you guide me to any relevant tests I should run?

Thanks.
image

Update:
When running the https://graph.facebook.com/v6.0/me/adaccounts call using Postman, I do see the three accounts. At least one of them returns data on /ads.

@spijs
Copy link
Author

spijs commented Mar 1, 2020

Update:
When I limit the 'insights' to all only (not the active ones), everything seems to work.

@spijs spijs changed the title Facebook ads -> no ad accounts Facebook Ads does not load any ad accounts in navigator Mar 1, 2020
@spijs spijs changed the title Facebook Ads does not load any ad accounts in navigator Facebook Ads does not load ad accounts in navigator Mar 1, 2020
@GuidoPinaresCh
Copy link

Could you resolve it?, i get this two errors
first when i try to load into power bi

image

and second when im trying to compile it

image

Help please!!

@mbilling
Copy link
Owner

mbilling commented Apr 8, 2020

Try and change the function
// Navigation entry point
[DataSource.Kind="FacebookAds", Publish="FacebookAds.Publish"]
shared FacebookAds.Ads = (optional url as text, optional params as record) =>
let
key = Extension.CurrentCredential()[access_token],
seed = baseUrl & "me/adaccounts?" & Uri.BuildQueryString([access_token=key,fields="id,name",limit="1"]),
pagedResult = FacebookAds.GetPagedData(seed, {}),
table = FacebookAds.AdAccountsToNavigationTable(pagedResult)
in
table;

to

// Navigation entry point
[DataSource.Kind="FacebookAds", Publish="FacebookAds.Publish"]
shared FacebookAds.Ads = (optional url as text, optional params as record) =>
let
key = Extension.CurrentCredential()[access_token],
seed = baseUrl & "me/adaccounts?" & Uri.BuildQueryString([access_token=key,fields="id,name",limit="1"]),
pagedResult = FacebookAds.GetPagedData(seed, {}),
table = FacebookAds.AdAccountsToNavigationTable(pagedResult)
in
seed;

Check what you get from FB by pasting the URL into a browser
I looks like multiple of the same account - I haven't encountered this before
You would need to distinct the list returned if it contains duplicates on the same ad account

@GuidoPinaresCh
Copy link

GuidoPinaresCh commented Apr 8, 2020 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants