[web-devel] Yesod: facebook plugin
Mathew de Detrich
deteego at gmail.com
Tue May 17 09:11:42 CEST 2011
I am currently transferring my website from using the client side flow
version of facebook to using the server side flow (with the facebookauth
helper) using Yesod and I am having issues getting the facebook plugin
working.
One of the interesting things I noticed is that the redirect_uri that Yesod
outputs for my website is
https://graph.facebook.com/oauth/authorize?client_id=
<REMOVED>&redirect_uri=http%3a%2f%2flocalhost%2fauth%2fpage%2ffacebook&scope=userEmail%2cuserName%2cuserPasswordHash%2cuserCountryCode%2cuserActivated"
Now the way I read this, the field in your facebook app should be
localhost/auth/page/faceboook/ however putting this gives the error that
redirect_uri is not the same as specified in the application, so I changed
this to the same as the destination route which is defined in YesodAuth
as loginDest _ = RootR (so in this case its just localhost), however when
doing this I get an error (from facebook) stating "Invalid Arguments" (I
retrieve a HTML page with the following in the body)
<body><h1>Invalid Arguments</h1><ul><li>No input found</li></ul></body>
Is there a trivial example lying around implementing simple facebook login
using Yesod
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/web-devel/attachments/20110517/91fc4164/attachment.htm>
More information about the web-devel
mailing list