I’m trying to improve my facebook skills with corona, though I have a pretty general grasp on many things I find it really irritating that I have to see the facebook login everytime I launch my app. I have implemented the SSO with FB but after I first approve the app for facebook I really shouldn’t need to see the “facebook login rollover” everytime I launch the app.
Is there a better way of oing this to avoid the FB login rollover everytime? my goal is to request the statuses/feed on “applicationStart” and “applicationResume” if the app is paused and decode the event.response and save it to a table.
Anyone?
Thanks.
I have this in my main.lua
[code]
function getFacebookStatuses()
facebook.request(ProfileID…"/statuses")
end
function getFacebookFeed()
facebook.request(ProfileID…"/feed")
end
function facebookListener(event)
if event.isError then
native.showAlert(“Error”, event.response, { “Ok”, })
else
if event.type == “session” and event.phase == “login” then
–getFacebookStatuses()
–getFacebookFeed()
–postFacebookPhoto()
elseif event.type == “request” then
native.showAlert(“Ok”,“it worked” , { “Ok” })
end
end
end
facebook.login(facebookAppID, facebookListener)
local function onSystemEvent( event )
if event.type == “applicationStart” then
getFacebookStatuses()
elseif event.type == “applicationExit” then
elseif event.type == “applicationSuspend” then
elseif event.type == “applicationResume” then
getFacebookStatuses()
end
end
Runtime:addEventListener( “system”, onSystemEvent )
[/code] [import]uid: 65840 topic_id: 28782 reply_id: 328782[/import]