Search code examples
pythonfacebookfacebook-sdk-4.0facebook-marketing-apifacebook-business-sdk

how to get Campaign name from campaign ID using facebook SDK?


I have created a campaign using below code.

fields = []    
params = { 
'name': 'My campaign',
'objective': 'LINK_CLICKS',  
'status': 'PAUSED',
}

AdAccount(id).create_campaign(
  fields=fields,
  params=params,
)

when I try to get campaigns by using below code,

my_account = AdAccount('act_xxxxxxxxx')
campaigns = my_account.get_campaigns()

I'm getting only campaign ID's.

How to know the name of the campaign ID?


Solution

  • For Future reference to others.

    I found the answer. We can check that by adding extra columns in ad manager dashboard. At the right corner there was Plus symbol(+) which is automatic column suggestions are on. Click the customize columns --> In standard events --> settings --> Object names and ID's.