Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem when using multiple scopes in facebook #53

Closed
Pitchlab opened this issue Jun 7, 2016 · 3 comments
Closed

Problem when using multiple scopes in facebook #53

Pitchlab opened this issue Jun 7, 2016 · 3 comments

Comments

@Pitchlab
Copy link

Pitchlab commented Jun 7, 2016

Hi,

I am using grant express and trying to make the facebook example work. The twitter and e.g. moves examples work fine. With facebook there is a problem though. After testing it occurs only when there are multiple scopes defined in the config.

{
  "server": {
    "protocol": "http",
    "host": "localhost:3000"
  },
  "facebook": {
    "key": "(key)",
    "secret": "(secret)",
    "callback": "/handle_facebook_callback",
    "scope": [
      "public_profile",      
      "user_groups",
      "user_likes"
    ]
  }
}

When running, facebook fails to properly redirect back and the query string in the debug shows the scope parameters as url encoded comma separated list:

...&scope=public_profile%2Cuser_groups%2Cuser_likes

With a facebook error message. "Sorry, something went wrong."

When I replace (manually) in the query string with

...&scope=public_profile&scope=user_groups&scope=user_likes

it works fine. Regular commas also don't work manually in the querystring.

What am I doing wrong? I am inclined to think I am missing something totally obvious...

Thanks!

@simov
Copy link
Owner

simov commented Jun 7, 2016

Seems to be working here. What exactly is the error message returned from Facebook?

@Pitchlab
Copy link
Author

Pitchlab commented Jun 7, 2016

Hi

The site you gave gives me the same error, so I tried a different browser
for good measure. Safari does work. (My) latest version chrome doesn't
(Mac, Yosemite) Weird.

Update: turning off all extensions made it work on chrome as well. Must be
some interference there. As I suspected, something stupid from my side...
Thanks for looking into this.

......................................................................................................
......................................................................................................
*Erik van der Pluijm / *Creative Director & Founder / Thirty X
http://www.thirty-x.com
....................................................................
..................................
......................................................................................................

Check out our new book: Design A Better Business! http://bit.ly/MaDBP
....................................................................
..................................
......................................................................................................
Prinsengracht 326 ST / 1016HX Amsterdam / NL / +31 6 1250 4841 /
Facebook https://www.facebook.com/ThirtyX / Twitter
https://twitter.com/erikvdpluijm / Instagram
http://instagram.com/ubilaz
....................................................................
..................................
......................................................................................................

On Tue, Jun 7, 2016 at 11:07 PM, simo notifications@github.com wrote:

Seems to be working here https://grant-oauth.herokuapp.com. What
exactly is the error message returned from Facebook?


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#53 (comment), or mute
the thread
https://github.com/notifications/unsubscribe/AASL0RjlVTn_rRxBHBMnxugYPOGx-S5Gks5qJd13gaJpZM4IwWvp
.

@simov
Copy link
Owner

simov commented Jun 7, 2016

No problem.

@simov simov closed this as completed Jun 7, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants