Recently we have integrated “Sign in with Facebook ” functionality in one of our social project that we are building with Lift 2.4 . This post summarizes the work done step by step.
1) Create a Facebook App (if you do not have one already)
Follow the link https://developers.facebook.com/apps and create an app. Enter all the details including Site URL . The Site URL could be something like http://www..com/api/facebook/auth.
Facebook would send response on this Site URL . Once you would save this apps , you would get a
App ID/API Key and secret .
Take a note of this
App ID/API Key and secret .
We would use them in our code.
2) If you are using Lift, then add the
App ID/API Key and secret key in your default.props.
3) Download a Facebook login image from fb.png .
4) Let us now create FacebookGraph.scala to configure App ID/API Key , secret key and callbackURL . We would also use this scala file to request access token from Facebook .
5) Now let us create Facebok snippet to show Facebook login link on the login page .
6) Add Facebook login link in the login.html.
7) Now let us create Facebook Connect Menu in your SiteMap.scala .
8) Finally create Facebook.api to get response from Facebook .
That was ultimately helpful, even with some methods is not there in lift by default.
Very helpful post.
Hello
Very interesting your post
I’m doing my thesis project and I need some of your code
Try to compile it but some files are missing
Can you help with the missing files?
Really I am very interested
Hey Nayli ,
We have given a basic idea to implement Facebook functioanlity.
Is your project based on Scala and Lift ?
Could you please write here error log , which you are getting while compilation .
Sign-in with Facebook” functionality using Scala but i can’t understand where place this code 🙁
we use play not lift
can u u share whole application plz