2

I note that using OAuth authentication if the initial access token is exchanged the maximum duration that access of data without having a user reauthenticate to renew the access token is 60 days.

I am writing a server which effectively requires perpetual access. There is no user interaction, the server compiles reports from the data it reads and emails them to interested parties. So forcing a human to reauthenticate every 60 days is not possible.

So as things stand it sounds like there is no way for me to do this. However I use iOS and Android Facebook apps which only ever require one login, when the app is first run up. They do not reauthenticate their users. How are they doing this, and how can I apply it to my situation.

Thanks.

Martha
  • 81
  • 1
  • 1
  • 8
  • What kind of Access Token are you using for your app? User, Page, App...? – Tobi May 07 '14 at 10:00
  • Not sure, but I think it is App. To get it I generate an initial token using the following URL "https://www.facebook.com/dialog/oauth?client_id=&redirect_uri=https://www.facebook.com/connect/login_success.html&response_type=token&scope=basic_info,read_stream" and then exchanging that for a long term token using this URL "https://graph.facebook.com/oauth/access_token?grant_type=fb_exchange_token&client_id=&client_secret=&fb_exchange_token= Thanks – Martha May 08 '14 at 07:51
  • So you're using a User Access Token so far. Those cannot be perpetual like Page or App Access Token. What kind of data is read by the server? – Tobi May 08 '14 at 08:52
  • We are interested in anything which is posted to the facebook wall/timeline associated with the server facebook account. How should I be doing this if I want perpertual access? – Martha May 09 '14 at 13:31
  • I don't really understand... What do you mean with " associated with the server facebook account"? – Tobi May 09 '14 at 13:39
  • What I need to do is have the software access posts to a given facebook page, and only login once. In contrast to how I am accessing facebook in the process described a couple of post above, how can I achieve this ? Thanks. – Martha May 14 '14 at 08:09
  • If you just want to read public Page posts, then a normal App Access Token in the form of `{app_id}|{app_secret}` should work according to https://developers.facebook.com/docs/graph-api/reference/v2.0/page/feed/#readperms – Tobi May 14 '14 at 08:16
  • Are you saying that an App Access token does not expire ? – Martha May 14 '14 at 08:49
  • Yes, as long as you don't change your app secret. – Tobi May 14 '14 at 08:53

0 Answers0