facebook / facebook-ruby-business-sdk

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

Provided permission is not valid. #97

Closed topray closed 4 years ago

topray commented 4 years ago

Here is an example code provided by Facebook: https://developers.facebook.com/docs/business-sdk/common-scenarios/onboard-at-scale/common-scenarios/

raw_child_business_token = business_1.access_token.create({
  app_id: <APP_ID_FOR_ONBOARDING>,
  scope: 'manage_pages,ads_management,business_management',
})

However, in reality, I received the following response.

FacebookAds::ClientError (Provided permission is not valid. Check you spelling and syntax.: Permission not valid (fbtrace_id: AITW7dqgPHCKKjvhH4hmpng))

I think you need to modify the code below. Please check. https://github.com/facebook/facebook-ruby-business-sdk/blob/dcc6ad49c39e313ae307d864448dd56103a4e8ea/lib/facebook_ads/ad_objects/business.rb#L127

Thank you for your supporting.

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.

stale[bot] commented 4 years ago

Closing this issue after a prolonged period of inactivity. If this issue is still present in the latest release, please feel free to create a new issue with up-to-date information.

daedric commented 3 years ago

This is still buggy. From what I saw, the serializer is not valid it sends a string such as "p1,p2,p3" instead of p1,p2,p3 because for some reasons it serializes to json the string. It is worth mentionning that if I try to send an actual Permission list, the json serialization is giving something worse: [{"permission":"p1"},{"permission":"p2"},{"permission":"p3"}]

afn commented 1 year ago

This bug is still present. Submitted PR #202 to fix it.