Strange Access Token returned from Facebook

ぃ、小莉子 提交于 2019-12-07 14:18:33

问题


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??


回答1:


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!




回答2:


This looks to be the new encrypted access token that Facebook is moving to. Will probably be the norm. If you were previously parsing it for different bit's of info you'll probably need to change to decoding it.



来源:https://stackoverflow.com/questions/7357801/strange-access-token-returned-from-facebook

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!