Determine if logged into Facebook?

Hi,

Is there any way I can determine if I am logged into Facebook or not? I assume I can just call the Facebook.Login() before each request so if I am not it will prompt the user to log in. I know GitHub has a method in his library to see if the user is logged in at anytime but I wasn’t using that library right now. So thought I would ask anyways.

Thanks!!

Warren
[import]uid: 184193 topic_id: 33025 reply_id: 333025[/import]

I believe your app only needs to call facebook login once per run. It can be suspended for weeks (not closed), wake up and post to facebook without calling the facebook login again.

I think the corona sdk is keeping track (per run) of whether you called it, and will determine if the access token it received is still valid. If it is not (like app has been suspended for two weeks), the sdk will automatically log the user back in before making the fb post call.

So I think the best way to determine if the user is logged in, is to store / keep a variable in your code (whether you called facbook.login or logout). If (you called) login is true, make your fb post, else not. [import]uid: 79933 topic_id: 33025 reply_id: 131089[/import]

I believe your app only needs to call facebook login once per run. It can be suspended for weeks (not closed), wake up and post to facebook without calling the facebook login again.

I think the corona sdk is keeping track (per run) of whether you called it, and will determine if the access token it received is still valid. If it is not (like app has been suspended for two weeks), the sdk will automatically log the user back in before making the fb post call.

So I think the best way to determine if the user is logged in, is to store / keep a variable in your code (whether you called facbook.login or logout). If (you called) login is true, make your fb post, else not. [import]uid: 79933 topic_id: 33025 reply_id: 131089[/import]

i would also like to know the answer to this, i am pretty sure the terms of services of facebook are that the user must be able to login and logout of the app, for websites you must be able to log out. (facebook: Your website must offer an explicit “Log Out”). it would be nice to call something to determine if the user is logged in / or the token is valid.

i know the call for the javascript is FB.getLoginStatus but i have yet to resolve the best way to to this in corona.
[import]uid: 89663 topic_id: 33025 reply_id: 131158[/import]

i would also like to know the answer to this, i am pretty sure the terms of services of facebook are that the user must be able to login and logout of the app, for websites you must be able to log out. (facebook: Your website must offer an explicit “Log Out”). it would be nice to call something to determine if the user is logged in / or the token is valid.

i know the call for the javascript is FB.getLoginStatus but i have yet to resolve the best way to to this in corona.
[import]uid: 89663 topic_id: 33025 reply_id: 131158[/import]