I am trying to implement a small feature using facebook feed to get the timestamp of user's last activity but I am facing insane issues doing so. For me documentation isn't enough, I've spent the complete day and I am nowhere.
I am using Java for the backend, and I need a feature for iOS app's backend.
Feature: I have user's fbId and app secret. user login itself using app and app is saving fbId in the backend.
In Backend, I need to see when the user last used Facebook (using feed) and determine if I should reset a timer or not.
Requirement:
1) I need some way to get a lifetime access token or some way to get an access token with userFbId and app secret that iOS app is saving to DB after getting permission from the user.
2) I need to know how I can fetch feed for the user. (For this I found an example)
I found some examples using restFb, but they aren't enough for the auth process. Its server so I can't prompt user to get me anything, and since its kind of a cronjob, I cant ask app to get me access token when it expires, because user may or may not using it.