Hi, I'll definitely take a look. But I think FB connect is not applicable for our use..
Here a simple version of the use: - We have a Lift application providing a RESTfull JSON API for our clients. Through that API a client application can share a photo to Facebook - We have a Web client for the API provided by the Lift server looming on a different machine. That client does the FB login in order to get a token for the user. - That token is sent to the Lift server which uses it to create a new client (val client = FacebookClient.fromAuthToken(authToken).get) - When the user shares a photo through our API that fb client is used to upload the photo to Facebook On Feb 9, 6:06 am, Jonathan Hoffman <jonhoff...@gmail.com> wrote: > Hi All, > > I just created issue #336 to provide a Facebook Connect helper and example > application. You can take a look at what I've got > here:http://github.com/dpp/liftweb/commit/3b6686201e3b7f22100e52a04734fd4c... > > Leo, if you're trying to use fb connect, hopefully this will help you out (I > would suggest using connect rather than redirecting to FB) > > Will push out to master pending your comments and RB. > > - Jon > > On Feb 5, 2010, at 10:35 AM, Leo Lännenmäki wrote: > > > Hi, > > > I have only tried to do a couple of things with the Facebook module > > (I'm using 2.0-M1) and I have gotten some of the stuff to actually > > work :) > > > Photo upload would be something like this: > > > import java.io.File > > import org.apache.commons.io.FileUtils > > import net.liftweb.ext_api.facebook._ > > import scala.xml._ > > > FacebookRestApi.apiKey = "your api key" > > FacebookRestApi.secret = "secret" > > > // Get a user to login to Facebook with a link like > >http://www.facebook.com/login.php?v=1.0&api_key="your api key" > > // If you mess around with the Facebook settings you will get FB to > > // redirect the user back to your app with a token as a query param > > > val authToken = "as described previously" > > val client = FacebookClient.fromAuthToken(authToken).get > > val photo = new File(...) > > val bytes = FileUtils.readFileToByteArray(photo) > > val resp = client !? UploadPhoto("test.jpg", "jpg", bytes) > > val photoUrl = (resp \\ "link").text > > > Getting a list of friends: > > val resp = client !? GetFriends() > > > Some real documentation and examples sure would be nice! > > > Leo > > > On Feb 3, 9:00 am, celestocalculus <celestocalcu...@yahoo.co.uk> > > wrote: > >> Hello, > >> I'm an intermediate lift developer. Suddenly, it has become my first > >> choice framework for web applications. I really think it's a nice > >> framework you guys are doing a great job. > >> I'm new on facebook application development and I have been looking at > >> the liftweb facebook API. I really don't know how to put this but I'm > >> just blank, I don't know where to start. I would really appreciate it > >> if I get a step by step explanation. All the book I got on facebook > >> apps are on php and I find it difficult to match the php codes to > >> their corresponding lift counterparts. > > >> Please I'll also appreciate sample codes, please let it be step by > >> step and on point. > > >> Thanks in advance. > > > -- > > You received this message because you are subscribed to the Google Groups > > "Lift" group. > > To post to this group, send email to lift...@googlegroups.com. > > To unsubscribe from this group, send email to > > liftweb+unsubscr...@googlegroups.com. > > For more options, visit this group > > athttp://groups.google.com/group/liftweb?hl=en. -- You received this message because you are subscribed to the Google Groups "Lift" group. To post to this group, send email to lift...@googlegroups.com. To unsubscribe from this group, send email to liftweb+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/liftweb?hl=en.