facebook / facebook-ruby-business-sdk

Ruby SDK for Meta Marketing API
https://developers.facebook.com/docs/business-sdk
Other
204 stars 161 forks source link

Can't pull campaigns from Ad Accounts #187

Closed RecruboMark closed 1 year ago

RecruboMark commented 1 year ago

Which SDK version are you using?

facebookbusiness-0.15.0.0

What's the issue?

I am unable to pull all campaigns from an Ad Account

Steps/Sample code to reproduce the issue

  1. Create a session object from an access_token
  2. Pull account name from API
  3. Pull campaign name from API
  4. Try to pull the campaign from the ad account image

Observed Results:

Tried accessing nonexisting field (campaigns) on node type (Page) I could not pull the campaigns that belong to an ad account from the API.

Expected Results:

I was expecting to be able to pull all Campaigns by first pulling the ad account and then trying to fetch all campaigns. To display I do have the rights to pull both AdAccount information & Campaign information i've pulled them individually in the screenshot.

stcheng commented 1 year ago

the ID is not an ad account ID but a page ID