Code Cooker
Code Cooker

Reputation: 939

Facebook graph API not returning name with ads account listing

I'm trying to get all the personal ads account list. However, I get the IDs and act_ids but not the name along with them.I'm checking all the way but found no clue what's wrong i'm doing. I believe there's definitely way to get names with them as well.

I took all the reqired permissions, I believe you can check on this attached ss There's only IDs but no ad accounts name.

Upvotes: 0

Views: 293

Answers (1)

Code Cooker
Code Cooker

Reputation: 939

I was not getting name because by default the api doesn't return any other informations!

You have to mention the fields to get speicifc information you need. For me i needed name for the ad account so what i did is this https://graph.facebook.com/v9.0/${fb_id}/adaccounts?fields=name&access_token=${token}

this way my result was expected one's. Although i was looking for this information speicifically but i didn't saw anywhere. Hope this will help you guys!

Upvotes: 2

Related Questions