README.md in account_kit-0.1.2 vs README.md in account_kit-0.2.0
- old
+ new
@@ -1,10 +1,11 @@
[![Code Climate](https://codeclimate.com/github/Coffa/account_kit/badges/gpa.svg)](https://codeclimate.com/github/Coffa/account_kit)
# AccountKit
A light-weight Ruby API client for [Facebook Account Kit](https://developers.facebook.com/docs/accountkit) with no dependency.
-A demo of the Account Kit can be found [here](https://www.facebook.com/FacebookforDevelopers/videos/10153620979588553/).
+A video demo of the Account Kit can be found [here](https://www.facebook.com/FacebookforDevelopers/videos/10153620979588553/).
+You can find a demo app [here](https://github.com/vnnoder/account_kit_demo)
## Installation
Add this line to your application's Gemfile:
@@ -32,10 +33,16 @@
config.app_secret = 'abcdefghijklm'
config.api_version = 'v1.0'
end
```
+AccountKit support App Secret Proof, if you turn on "Require App Secret", add the following config:
+
+```
+config.require_app_secret = true
+```
+
### API
If you turn off Enable Client Access Token Flow and use [Authorization Code Flow](https://developers.facebook.com/docs/accountkit/accesstokens), you need to provide the authorization code after user authenticate with Account Kit in order to get an access token:
```
@@ -45,11 +52,10 @@
If you turn on Enable Client Access Token Flow, you should already have an access token after user authenticate. To get account information, use the access token to get user's email or phone number:
```
response = JSON.parse(AccountKit.me(access_token).body)
email = response[:email][:address]
-phone_code = response[:phone][:country_prefix]
-phone_number = response[:phone][:national_number]
+phone_number = response[:phone][:number]
```
## Development
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.