1 个不稳定版本
使用旧 Rust 2015
0.1.0 | 2016年10月25日 |
---|
#20 in #released
600KB
329 行
包含 (WOFF 字体,120KB) docs/Heuristica-Italic.woff,(WOFF 字体,90KB) docs/FiraSans-Medium.woff,(WOFF 字体,92KB) docs/FiraSans-Regular.woff,(WOFF 字体,56KB) docs/SourceCodePro-Regular.woff,(WOFF 字体,56KB) docs/SourceCodePro-Semibold.woff,(WOFF 字体,49KB) docs/SourceSerifPro-Bold.woff 等1个文件.
Rust Accountkit
文档
概览
rust-accountkit 是 Facebook Accountkit 的实现。
lib.rs
:
rust-accountkit 是 Facebook Accountkit 的实现。
示例
let app_token = format!("AA|{}|{}", "facebook_app_id", "account_kit_client_secret");
let account_kit = AccountKit::with_token(app_token.as_str(), None);
// If you have enabled the Require App Secret setting in your app's dashboards, most calls that accept an account access token as a parameter will now require an additional appsecret_proof parameter to verify that these calls are coming from your own servers.
// app secret proof is a sha256 hash of your access token, using the app secret as the key
let account_kit = AccountKit::with_token(app_token.as_str(), "appsecret_proof_key");
let response = account_kit.authorization_code("authorization_code").retriev();
match response {
Ok(user_token) => println!("{:?}", user_token),
Err(err) => println!("{}", err.to_string())
}
依赖项
~5MB
~114K SLoC