facebook / facebook-nodejs-business-sdk

Node.js SDK for Meta Marketing APIs
https://developers.facebook.com/docs/business-sdk
Other
489 stars 226 forks source link

`getAds` never returns `video_id` field #273

Open mrowles opened 7 months ago

mrowles commented 7 months ago

Which SDK version are you using?

v18.0

What's the issue?

The getAds never returns the video_id field, even when requested for video ads which definitely have video creative.

Steps/Sample code to reproduce the issue

    FacebookAdsApi.init(accessToken);
    const adAccount = new AdAccount(`act_${adAccountId}`);
    const ads = await adAccount.getAds([
     ...
    ]);
    const adCreatives = await Promise.all(
      ads.map((ad) => ad.getAdCreative([
        'video_id'
      ])
    )
    const adVideos = await adAccount.getAdvideos([
      'id'
    ])

Observed Results:

  1. video_id just simply is not returned
  2. the asset_feed_spec returns back an array of a small amount of video information, but none of the id's match the id's returned in the getAdVideos endpoint.

Expected Results:

  1. the video_id is returned
  2. the ids in getAdVideos match the getAdCreative->asset_feed_spec->video ids.