Facebook新的API还需要xdreceiver? [英] Facebook new API still require xdreceiver?

查看:88
本文介绍了Facebook新的API还需要xdreceiver?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在旧的API中,init函数需要xdreceiver的路径,现在我看到它从文档中消失。



我以为xdreceiver是从Facebook设置您的域中的Cookie,但现在如何工作?

解决方案

假设你在谈论一个外部或iframe的Facebook应用程序,那么Facebook使用OAuth2.0系统,并在您的服务器上存储一个cookie形式为fbs_APPID,其中APPID显然是您的连接/画布应用程序的应用程序标识。



在此cookie内部有一个access_token,由旧的休息API以及代表用户发出请求的新图形API。这意味着xdreceiver文件不再需要。



请参阅Facebook开发人员关于OAuth2.0认证的文章这里
Canvas应用程序还可以利用新的实验签名请求来接收access_token。


In old API the init function required path to xdreceiver and now i see it disapeared from docs.

I thought the xdreceiver is for seting cookies in your domain from facebook, but how it's working now?

解决方案

Assuming your talking about an external or iframe Facebook application then Facebook uses the OAuth2.0 system and stores a cookie on your server of the form fbs_APPID where APPID is obviously the application id of your connect/canvas application.

Inside this cookie there is an access_token which is used to by both the old rest API and the new graph API to make requests on behalf of the user. This means the xdreceiver file is no longer required.

See the Facebook Developers article on authentication in OAuth2.0 here Canvas applications can also take advantage of a new experimental signed request in order to receive the access_token.

这篇关于Facebook新的API还需要xdreceiver?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆