facebook / facebook-ruby-business-sdk

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

FacebookAds::ServerSide (NameError) Did you mean? FacebookAds::ServerError #148

Open elmo opened 2 years ago

elmo commented 2 years ago

Which SDK version are you using?

facebook-ruby-business-sdk

What's the issue?

Example code doesn't excute.

Steps/Sample code to reproduce the issue

user_data = FacebookAds::ServerSide::UserData.new(email: 'real@email.com')

Observed Results:

Exception thrown:

FacebookAds::ServerSide (NameError) Did you mean? FacebookAds::ServerError

Expected Results:

No error to be thrown. The call to work was presented in the documenation

Versions:

facebook_ads (0.7.0) facebookbusiness (0.3.3.3) Api version: FacebookAds.configure do |config| config.access_token = access_token config.api_version = "v11.0" end

luhova commented 2 years ago

I get the same error. I installed the gem and when trying to test it in the Rails console, I get:

irb(main):034:0> FacebookAds::ServerSide
NameError: uninitialized constant FacebookAds::ServerSide
luhova commented 2 years ago

Update: I saw the 0.3.3.3 version has been installed. After upgrading to 0.8.0.0, the issue was resolved.

elmo commented 2 years ago

Thanks, yes, that was the issue.

olleolleolle commented 2 years ago

See #153 - The current release of Countries gem blocks users of that from installing a current facebookbusiness.

A workaround is to use the code offered in #153, so in your Gemfile:

# Can use released gem when this is merged and released https://github.com/facebook/facebook-ruby-business-sdk/pull/153
gem "facebookbusiness", github: "herimedia/facebook-ruby-business-sdk",
    branch: "niels/relax-countries-version-constraint"
stale[bot] commented 2 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.