facebook login?

Trying to use the facebook plugin, when the popup comes up it says “stay logged in” but the framework doesn’t seem to provide that functionality compatibility. Want the app to remember the users preferences and login info so at certain points can auto trigger facebook posting, even on subsequent app launches. Anyone had success already in getting this to work? thanks! [import]uid: 6317 topic_id: 1130 reply_id: 301130[/import]

I believe the code in our Facebook sample will actually log that application in “forever” (by storing permissions on the Facebook server), so in theory you only need to ask once, and if you get a success response you can store that fact and then stop asking for login on launch.

However, I think the user might be able to revoke the application’s permission via the Facebook website, so to handle that case you’d probably want to check for error responses from your posting attempts, which our sample code currently isn’t doing.

This is an area we’re investigating, because it would be nice to integrate Facebook more transparently and “under the hood”. But people do seem to be getting things done with the current library in the meantime. [import]uid: 3007 topic_id: 1130 reply_id: 3097[/import]

hmm somehow for me it asks me to re-login everytime I relaunch the application. I was thinking that locally would have to store a session ID and some other stuff to get it to not ask [import]uid: 6317 topic_id: 1130 reply_id: 3100[/import]

Right – currently, it’s entirely manual, and you would have to store something indicating a previously successful login, and then detect that on the next launch and not show the webpopup.

I believe this should work, assuming you store the sessionid returned the first time and don’t ask for another login, since I think the combination of appid, secret key (for that app) and sessionid should allow you to keep making Facebook posts for that user, until they revoke the permissions.

The current “facebook.lua” library was mainly built to handle the really tedious parts of making a Facebook call: it alphabetizes all the name-value parameter pairs, then MD5-hashes that string with a key, then appends that to the end of the URL as a new parameter, then parses the JSON responses from the Facebook server back into a Lua table… etc. The library automates all that and gives you a clean Lua interface to the Facebook API. [import]uid: 3007 topic_id: 1130 reply_id: 3101[/import]