Skip to content

.getCampaigns() doesn't return any data #320

@Hari-07

Description

@Hari-07

Following the example from the readme , I did

 const adAccount = new AdAccount("act_3984312178532482");
 const campaignsData = await adAccount.getCampaigns([Campaign.Fields.name], {
      limit: 2,
    });

This isn't returning any data and my request just times out after 10s.

However if try to use the API directly like so

const response = await fetch(
    `https://graph.facebook.com/v21.0/act_3984312178532482/campaigns?fields=name&access_token=${accessToken}`,
);

It works just fine and is pretty fast too.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions