facebook / facebook-ruby-business-sdk

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

Calling a deprecated version of the Ads API #86

Closed SunnyIzr closed 4 years ago

SunnyIzr commented 4 years ago

Which SDK version are you using?

The latest version

What's the issue?

It's saying that I'm calling a deprecated version fo the API.

Steps/Sample code to reproduce the issue

To replicate, i'm running the following code access_token = 'XXX' app_secret = 'XXX' ad_account_id = 'act_XXX'

FacebookAds.configure do |config| config.access_token = access_token config.app_secret = app_secret end

ad_account = FacebookAds::AdAccount.get(ad_account_id) ad_account.campaigns(fields: 'name').each do |campaign| puts campaign.name end

Observed Results:

Getting the following error: FacebookAds::ClientError ((#2635) You are calling a deprecated version of the Ads API. Please update to the latest version: v5.0.: (fbtrace_id: A-5OEkzZuhzfdDs5pTN5jkF))

Expected Results: