How to check user is using my application facebook - facebook

I want check how to know user is using my application facebook
Example: One user go to application page, i set user online, when user close application page, i set user offline
Thanks.

If you haven't heard from a user for some time, chances are that he closed a page with your app.
Memorize last time a user did anything in your app, and set a timeout. If N minutes later there are no new actions, you mark him offline.

Related

What happens when a user removes my app from Facebook via the "Apps and websites" settings and tries to reconnect in my app?

So I've seen many related questions but they all date from years ago (Facebook SDK changes constantly) and mine is more specific.
I'm building a web app which requires authentication and Facebook API is one of its auth solutions and I'm trying to catch some scenarios. So as I asked earlier, what happens when someone removes my app from Facebook via the "Apps and websites" settings and tries to reconnect in my app ?
It might seem obvious to some that the user wouldn't get logged in because as far as I know in 2021, FB SDK uses an app specific ID for each user which gets generated when logging in for the first time and is useless when the user removes the app from his settings because there's no more mapping between the ID and the user.
But I've experienced in an app that I used (ometv kinda similar to omegle) that they log you in even after you delete them from the Facebook settings.
Thanks for considering my question.
EDIT: This is the edge case that I'm referring to from facebook dev
Someone removes your app from Facebook via app settings and revisits your app. Your app should detect this and prompt the person
to log back in. Go to your app and tap on the "Log in with Facebook”
button Tap OK to accept the read permissions (and OK again to accept
write permissions where applicable) Go to app settings on Facebook and
remove your app Repeat steps 1-2 and verify that Facebook Login works
A more specific question that I might ask would be whether or not a user can bypass this behavior ?

Facebook page tab prompting for login, but it shouldn't

When a user is not logged in and they navigate to a page tab made with our app, they get an obtrusive dialog asking them to log in:
This has nothing to do with http vs https, the app is not in sandbox mode, there is nothing in the tab asking for a login or user information, etc. I've gone through the app settings at least a half dozen times now, and nothing is wrong there. Aside of urls, the settings are identical to another app I have that does not suffer from this problem. I'm stumped!
Edit: here is an affected tab: https://www.facebook.com/StaticHtmlThunderpenny/app_203351739677351
This message is not about login to your app, but Facebook in general.
So my guess would be that the page your app is installed as page tab app on is restricted in some way – by age, location, or for having alcohol-related content. And then of course Facebook asks for login, because otherwise they can not determine whether or not the (as of now still “anonymous”) user qualifies to see the page.
So go check the page settings.
This is actually not app related question.
This is thumb rule!! To access any app on Facebook, you need to log in to Facebook. You can see Facebook page without log in. But for facebook apps, you should be authentic user.
with this issue in my own experience that I came across some years back with a facebook app that I was running, if this doesn't relate to any of your other social networking apps then am aligning two set of possibilities and solution.
The user might have not properly logged out as "written" in the app for the users logout stage.
Solution would be that the user logout as expected before closing the app.
The user might have set up an automatic login prompt which was removed by the app when it was been updated automatically. (If you do get me???)
Solution would be to monitise your app on updates and login informations or better still just login and logout ask intended by the app and for security reasons.
Lastly I would say that automatic bookmark database should be added to the server part so current pages as the user uses the app would be saved after logout or login stage. Thank you, hope this helps and if not let me know what am missing.

Start app on login

I'm trying to write a facebook app that WOULD (I don't even know if its possible yet) start running after the user login process. I mean, the user wouldn't have to access the app page to execute what I want to do, it would be like a background process that would be running for a limited amount of time after the login.
So, is that possible? I didn't find out this anywhere I've looked for.
I just can give you a "maybe".
Your startpage will just contain the facebook sdk functions, to complete a login.
If login complete redirect to the rootpage of your application, then set a timer, to give access for a limited time. If timer ran out -> redirect to the login page.

how to post on facebook user's profile every time user logs in?

i'm a newbie to facebook app. development. As part of my term project i have to design an app.
i want to make a call to method 'feed dialogue' or want to post on user's wall, every time user logs in to his account.. which means i want to trigger my app. automatically every time user logs in........ or can my app. be triggered automatically every time user post some thing ??..... should i make my app. run in background.... or what should i do..??
give me some references or anything...
Thank you

Twitter and Facebook on iPhone - save sessions across app launches?

I am using OAuth for twitter and fb-connect for facebook authentication in my iPhone app. Is it possible to save the user sessions across app launches?
i.e. if the user logs in once, the next time they launch the app, we log them in automatically from some state saved the last time the app closed?
For Twitter would it work if I just save the auth_token and use it every time the user wants to use twitter from my app? Or do I need to do anything else? I could not get it to work like that so wondering if I was doing something wrong.
Thanks.
For Twitter you will need to save the access_token. This is unique to the user/application and when saved will let you act as the users for future requests. It will consist of two strings one of which will start with the user's id.