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 ...
随机推荐
- zoj 2722 Head-to-Head Match(数学思维)
题目链接: http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=2722 题目描述: Our school is planning ...
- 分布式理论(四)—— 一致性协议之 3PC
前言 我们说为了实现 BASE 理论,需要在可用性和一致性之间找到一个合适的一致性理论,于是,我们在上篇文章中了解了 2PC 理论,也就是两阶段提交,二阶段提交原理简单,实现方便,但是缺点则是同步阻塞 ...
- C# Claims-based(基于声明)的认证
本文是通过验证与网上资料整合的,请读者注意. 目录: 1. 什么是Claims-based认证 2.进一步理解Claims-based认证 3.Claims-based的简单demo 1. 什么是Cl ...
- Bower前端模块管理器
cnpm install bower -g 安装bower bower install jquery //bower会自动去网上找到最新版本的jquery bower uninstall jquery ...
- 如何修改eclipse中maven默认仓库路径
从eclipse中增加了maven2的插件之后,maven默认的本地库的路径是${user}/.m2/repository/下,一般windows用户的操作系统都安装在C盘,所以这个目录下的jar包比 ...
- Stack源码解析
我们从一个DEMO作为入口,了解Java的Stack的源码,代码如: Stack<String> stack = new Stack<>(); stack.push(" ...
- 【ibatis】IBatis返回map类型数据
有时侯不想创建javabean,或者污染现有的javaBean对象,就需要返回Map类型的数据对象: 1)最简单的方法就是将查询到的字段,使用""进行引起来,这样就可以返回map类 ...
- SpringBoot,Vue前后端分离开发首秀
需求:读取数据库的数据展现到前端页面 技术栈:后端有主要有SpringBoot,lombok,SpringData JPA,Swagger,跨域,前端有Vue和axios 不了解这些技术的可以去入门一 ...
- TCP Socket Http关系
理解Tomcat内部处理网络数据的机制同时需要了解相关的一些术语,这样我们在阅读源码的时候能更加清楚的理解Connector下使用到的Socket通信原理. TCP/IP: 数据在网络传输是基于TCP ...
- 关于ORA-12505, TNS:listener does not currently know of SID given in connect descriptor报错问题解决办法
1.本机tnsnames.ora 配置如下 test4= (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = 192.1 ...