Getting URISyntaxException using FBConnect module in Play Framework

244 views Asked by At

I'm trying to enable Facebook Registration with the fbconnect module for the Play Framework.

On my local server I'm getting to the Facebook permission page, but then I'm getting this exception:

Caused by: java.net.URISyntaxException: Illegal character in query at index 240: https://graph.facebook.com/oauth/access_token?client_id=18...13&redirect_uri=http://local.rank.my:9000/fbconnect/oauth/callback&client_secret=738fd...63590c5f&code=2.p2BLC_MSHV...496019|Hf_Dar_LB0zLVgwHrMkLFC3bA0g
    at java.net.URI$Parser.fail(URI.java:2809)
    at java.net.URI$Parser.checkChars(URI.java:2982)
    at java.net.URI$Parser.parseHierarchical(URI.java:3072)
    at java.net.URI$Parser.parse(URI.java:3014)
    at java.net.URI.<init>(URI.java:578)
    at java.net.URI.create(URI.java:840)

(I've replaced some characters with "..." for security).

The character at index 240 in the URL is the '|'. If this is actually an invalid character for a URL, why is Facebook returning it? If not, why is Java rejecting it?

Update: Apparently this was reported as an issue back in Nov 2010, and the author claimed it had been fixed (fbconnect-0.3 was released a while after that, and that is what I'm using).

1

There are 1 answers

0
Pere Villega On BEST ANSWER

as you yourself mentioned this is an encoding issue from the module. If you are still experiencing these issues maybe you want to try this other module.