Search code examples
javafacebookscribe

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 ?


Solution

  • 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.