Skip to content

Commit

Permalink
Pass scope parameter as a string, not a list of Permissions
Browse files Browse the repository at this point in the history
The scope parameter needs to be a string containing a comma-separated
list of scopes, e.g. "ads_management,manage_pages".

Fixes facebook#97.
  • Loading branch information
afn committed Nov 3, 2023
1 parent dddfc39 commit ccdfa15
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions lib/facebook_ads/ad_objects/business.rb
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,7 @@ class Business < AdObject
edge.post 'Business' do |api|
api.has_param :app_id, 'string'
api.has_param :fbe_external_business_id, 'string'
api.has_param :scope, { list: 'Permission' }
api.has_param :scope, 'string'
api.has_param :system_user_name, 'string'
end
end
Expand Down Expand Up @@ -936,7 +936,7 @@ class Business < AdObject
edge.post 'Business' do |api|
api.has_param :asset, { list: 'int' }
api.has_param :fetch_only, 'bool'
api.has_param :scope, { list: 'Permission' }
api.has_param :scope, 'string'
api.has_param :set_token_expires_in_60_days, 'bool'
api.has_param :system_user_id, 'int'
end
Expand Down
2 changes: 1 addition & 1 deletion lib/facebook_ads/ad_objects/user.rb
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ class User < AdObject
edge.post 'User' do |api|
api.has_param :business_app, 'int'
api.has_param :page_id, 'string'
api.has_param :scope, { list: 'Permission' }
api.has_param :scope, 'string'
api.has_param :set_token_expires_in_60_days, 'bool'
end
end
Expand Down

0 comments on commit ccdfa15

Please sign in to comment.