facebook / facebook-ruby-business-sdk

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

(#2635) You are calling a deprecated version of the Ads API. Please update to the latest version: v3.1.: #51

Closed aminabloc closed 4 years ago

aminabloc commented 6 years ago

Hi! I am having issues making calls to the API using token for my main account. Things are working find when I push & fetch data using my sandbox credentials.

rajraj commented 6 years ago

I am getting this as well when using the marketing API,

Ruby 2.4.3
Rails 5.2
FacebookAds 0.2.11.0
aminabloc commented 6 years ago

Heads up that I was able to work around this by making sure I was using the 3.0 version of the API for apps I created before July 26, but anything created after defaults to using 3.1 -_- Koala also allowed me to manually set my API version https://github.com/arsduo/koala Seems like none of the official sdks at this point support 3.1 or hard setting an API version...

rajraj commented 6 years ago

Thanks @aminabloc for the prompt response.

We are only using the apis provided by this gem to upload video files to Facebook. How did you able to get around this issue if you don't mind me asking?

rajraj commented 6 years ago

I have updated to the latest version of the gem and it seems to be working now. Thanks.

kurko commented 5 years ago

@rajraj is this still working? It seems like 0.3.2.x is completely broken, as well as 0.3.1.x.

rajraj commented 5 years ago

@kurko sorry for the late response. I no longer works on that project so not sure if its still works, sorry!

stale[bot] commented 4 years ago

Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. Thank you for your contributions.

kurko commented 4 years ago

Still waiting for an answer.

rodrigo-puente commented 4 years ago

@kurko you can make it work this way:

ad_account = FacebookAds::AdAccount.get("act_id", 'name', {
     access_token: token, app_secret: secret, api_version: '5.0'
})

Or

session = FacebookAds::Session.new(access_token: <ACCESS_TOKEN>, app_secret: <APP SECRET>, api_version: <VERSION>)

VERSION being 5.0 right now.

jingping2015 commented 4 years ago

Please update your SDK version to make sure still call valid API version.