On places.ae, we got notified of some issues with Facebook signups and logins. All of the sudden, when the Facebook OAuth service pushed us back to our redirect-page, the HyperGraph Gem threw the following error:
FacebookError: OAuthException – Invalid OAuth access token
This is often thrown because the Access Token could contain a | (pipe) character, which gets encoded to %7C, and this makes HyperGraph choke a bit. So a simple gsub(‘%7C’,’|’) will solve it, such as the code below:
at = HyperGraph.get_access_token(FB_ID, FB_SECRET, FB_RET, code)
at = at.gsub(‘%7C’,’|’)
g = HyperGraph.new(at)
me = g.get(‘me’)
Thanks,
Michael
Leave a Reply