Simple example of popup authentication with Facebook Graph API

Posted by ensnare on Stack Overflow See other posts from Stack Overflow or by ensnare
Published on 2010-04-26T20:36:15Z Indexed on 2010/05/13 5:34 UTC
Read the original article Hit count: 429

Trying to get Facebook to authenticate my users via a javascript popup. Right now, I have:

<input type="button" value="Connect with Facebook" onclick="window.open('https://graph.facebook.com/oauth/authorize?client_id=XXXXXXXXXXX&redirect_uri=http://example.com/step2&display=popup')"  />

But when the user logs in via Facebook, the popup just displays the Facebook.com homepage. I'd like for the popup to authenticate the user and go away so that I can start retrieving user data from the graph api.

Is there a better / easier way to do this? Simple examples are appreciated.

Thank you.

© Stack Overflow or respective owner

Related posts about facebook

Related posts about facebook-api