tophatter / facebook-ruby-ads-sdk

The Facebook Marketing API in Ruby.
https://developers.facebook.com/docs/marketing-apis
MIT License
62 stars 39 forks source link

Add ability to pass App Secret Proof with API requests #15

Closed tfe closed 7 years ago

tfe commented 7 years ago

In v2.10 of the Facebook Graph API, the following restriction was added:

App Restriction Enforcement - Specifying an access token for a user who fails the application's restrictions (such as country or age) will result in an error, unless an appsecret_proof is specified in the request.

This commit adds support for an optional app secret configuration variable that will then be hashed appropriately and included with API requests.

coveralls commented 7 years ago

Coverage Status

Coverage increased (+0.6%) to 73.946% when pulling 7181facba2214e60e14d364699300a85fd678c20 on add-app-secret into 9e02ea070771709add4495b6a6bbee030eb1d524 on master.