从Facebook返回的奇怪访问令牌 [英] Strange Access Token returned from Facebook

查看:81
本文介绍了从Facebook返回的奇怪访问令牌的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在使用Facebook应用程序,并且已经使用Facebook Graph Toolkit几个月了,而我的代码一直在工作(我可以获取访问令牌,也可以使用它们来检索Facebook用户详细信息,发布新闻供稿,等等)



现在,出现了一个新问题,我从没想到会发生这种情况,也不知道Facebook怎么了!



我一直在遵循旧的代码集,发现Facebook现在返回的访问令牌不是这种格式的(我一直使用的正确格式,甚至是相同的格式) 页面中找到的格式
| c4e304f814362ec6b6dd823a.1- | LeRzWafqGjfriGabNmmOU4U07Pw



现在,我一直在获取像这样的格式



AAABddZAETAbYBAKNESQCdiZC2ojQOjSAIHfFCBFtn99wUYC448po2FN4VrvempAQVnUaBwJb9QxwgZ1hZbhhZ1hZchbZbhbChZbhbcBhbcbJb9bWhzB1bJeBzbJb9cxz

任何人都知道会发生什么??

解决方案

这是新样式的access_token。您可以通过访问以下链接查看其工作情况:



https://graph.facebook.com/me?access_token= {您问题中的access_token}



此更改已在Facebook开发博客上发布:



https://开发人员。 facebook.com/blog/post/497/
...
https://developers.facebook.com/blog/post/555/



但是我还不能回答为什么这种风格access_token的名称已更改,因为文档尚未更新以显示此更改: https:// developers.facebook.com/docs/authentication/



注意:我建议您从问题中删除access_token,因为这意味着其他人也可以访问您的数据!


I have been working on Facebook app and I have been using Facebook Graph Toolkit for months and all the while, MY CODES are working (I can get Access Token, and I can use them to retrieve Facebook user details, publish news feed, etc)

Now, there's new problem arise that I never expect it to happen and didn't know what is wrong with Facebook!

I have been following my old set of codes and discovered that Facebook now returns back Access Token that is not in this format (which is the correct format all the while I'm using, it is even the same format found in this page |c4e304f814362ec6b6dd823a.1-|LeRzWafqGjfriGabNmmOU4U07Pw

Now, I've been getting the format like this

AAABddZAETAbYBAKNESQCdiZC2ojQOjSAIHfFCBFtn99wUYC448po2FN4VrvempAQVnUaBwJb9Qxwg6j9uegLZAeaZA4vmh503bHkUIsj1hIl1ZCvCbZBkz&expires=6204

Anyone knows what happen??

解决方案

This is the new style access_token. You can see it working by visiting this link:

https://graph.facebook.com/me?access_token={access_token from your question}

This change has been advertised on the Facebook dev blog:

https://developers.facebook.com/blog/post/497/ ... https://developers.facebook.com/blog/post/555/

I can't, however, yet answer why the style of the access_token has changed, because the documentation hasn't been updated yet to show this change: https://developers.facebook.com/docs/authentication/

Note: I suggest you remove the access_token from your question, as it means others are able to access your data!

这篇关于从Facebook返回的奇怪访问令牌的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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