开发者

Facebook returns #access_token

I am using Java Scribe + Spring MVC to access Facebook authentication API.

However, the URL with the access token I am getting back from Facebook is in this format:

/facebookCallback#access_token=[long chunk]&expires_in=5028

As you can see, the access_token is preceded by a #, which开发者_运维技巧 disallows me from obtaining the access_code as a normal parameter.

Is there any reason why Facebook is appending the # instead of a ?


var hash = document.location.hash;

I think you mean Javascript , and not Java Scribe ?


you are probably using the callback parameter which is designed for the JS library. Make sure you are not sending an incorrect parameter for "type".


Turns out that it probably was caused by my school network. I tried the exact same code both in school and at home and got different results (school - error, home - correct).

The problem solved by itself the next day in school so I won't be able to find out exactly why. Thanks to those who helped.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜