facebook api & oauth protocal
http://tools.ietf.org/html/draft-ietf-oauth-v2-31#section-10.5
http://stackoverflow.com/questions/14010876/cant-get-access-token-using-facebook-oauth
code
REQUIRED. The authorization code generated by the
authorization server. The authorization code MUST expire
shortly after it is issued to mitigate the risk of leaks. A
maximum authorization code lifetime of 10 minutes is
RECOMMENDED. The client MUST NOT use the authorization code
more than once. If an authorization code is used more than
once, the authorization server MUST deny the request and SHOULD
revoke (when possible) all tokens previously issued based on
that authorization code. The authorization code is bound to
the client identifier and redirection URI.
authorization codes MUST be short lived and single use
access_token should be posted
Expiration and Extending Tokens
Facebook's official SDKs manage the lifetime of tokens for you. When using iOS, Android or our JavaScript SDK, the SDK will handle making sure that tokens are refreshed before they expire.
很好的facebook api相关的博客: https://www.sammyk.me/
https://github.com/SammyK/LaravelFacebookSdk 这个github的作者
https://developers.facebook.com/docs/reference/login/signed-request
For certain types of apps, a signed request is passed to the app which contains some additional fields of information, even before Permissions have been requested.
The JSON object of the signed request does not have a strict format and varies between the different types of apps that can access it (Canvas, Page Apps, etc.), however you can assume that the payload may contain some of the following fields and values:
| Name | Description |
|---|---|
|
|
an OAuth Code which can be exchanged for a valid user access token via a subsequent server-side request |
|
|
A JSON string containing the mechanism used to sign the request, normally: |
|
|
A JSON number containing the Unix timestamp when the request was signed. |
|
|
A JSON string containing the User ID of the current user. |
|
|
A JSON object containing the |
|
|
A JSON string that can be used when making requests to the Graph API. This is also known as a user access token. |
|
|
A JSON number containing the Unix timestamp when the |
|
|
A JSON string containing the content of the |
|
|
A JSON object included when a Page tab loads your app. The object contains information about the Page that owns this tab. |
Some fields and values, the user_id and oauth_token for example will only be passed if the user haslogged into your app.
facebook api & oauth protocal的更多相关文章
- facebook api介绍
转自(http://sls.weco.net/node/10773) 一.Facebook API 基礎概念 Facebook API 概論 : API 最大的好處在於可以讓程式開發人員只需要根據 A ...
- facebook api之Access Tokens
Access Tokens When someone connects with an app using Facebook Login and approves the reqest for per ...
- Facebook API 入门
Facebook 商业价值简介 Facebook 是一个社交网络服务网站,于 2004 年 2 月 4 日上线,到 2010 年 2 月 2 日, Facebook 正赶超雅虎将成为全球第三大网站,与 ...
- facebook api之基本概念(中文)
Facebook广告API系列 1 Facebook Graph API Facebook提供了一套类rest的接口,统称为Graph API.为啥叫Graph?因为facebook把所有的资源都抽象 ...
- facebook api之Access Tokens之Business Manager System User
Business Manager System User Make programatic, automated actions on ad objects or Pages, or do progr ...
- facebook api之Access and Authentication
Access and Authentication There are three access levels to the Marketing APIs. You can upgrade acces ...
- Facebook通过oAuth验证获取json数据
首先下载facebook相关的动态库,下载文件:facebook.dll 获取授权token方法: private string SetToken(string gettoken)//此处是你的短to ...
- facebook api之Ads Insights API
The Ads Insights API provides API access for reporting and analytics purposes. When exclusively usin ...
- facebook api之Marketing API
General information on the Marketing APIs, access, versioning and more. The main use cases for the M ...
随机推荐
- [转载] npm 一些操作
npm i module_name -S = > npm install module_name --save 写入到 dependencies 对象 npm i module_name -D ...
- Http请求帮助类
using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Net ...
- winform 窗体中 Time 控件的用法
作用: 用于背景进程中.通过引发Timer事件,Timer控件可以有规律的隔一段时间执行一次代码.也就是,你可以根据你自己的需要,给Timer控件设置时间,Timer每隔这段时间,就执行一次代码. 属 ...
- 【ibatis】IBatis的动态SQL的写法
Ⅰ .动态SQL的写法 开始 <dynamic 条件成立时前面要加的字符串 prepend ="字符串"> prepend="字符串" 判断条件的对 ...
- (一)java并发知识图谱
- 撩课-Java每天5道面试题第19天
126.Struts2中的拦截器有什么用?列举框架提供的拦截器名称? )拦截器是struts2核心组成部分, 它提供了一种机制,使得开发者 可以定义一个特定的功能模块, 这个模块会在Action执行之 ...
- HDU4289(KB11-I 最小割)
Control Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Sub ...
- enum 的使用方法(java)
作者QQ:1095737364 QQ群:123300273 欢迎加入! enum很像特殊的class,实际上enum声明定义的类型就是一个类.而这些类都是类库中Enum类的子类(java ...
- javascript原型对象与原型链
在javascript中,当系统加载构造函授后 ,会自动在内存中增加一个对象,这个对象就是原型对象.构造函数和原型对象在内存中表现为相互独立,但两者之间还存在联系,构造函数的prototype是原型对 ...
- 为JavaScript正名--读你不知道的JavaScript(持续更新..)
你不知道的JavaScript上卷 JavaScript和Java的关系就像Carnival和Car的关系一样,八竿子打不着. JavaScript易上手,但由于其本身的特殊性,相比其他语言能真正掌握 ...