4

I have a problem in using facebook api.

My customer makes my facebook user admisistrator of his facebook product page.

I use a java engine which is scheduled for retriving this page insight data. As it is a java angine, ther is no "human" user who can perform some actions (a login for example).

For this reason I used an offline_access token so i could retrive data, for example, in this way:

https://graph.facebook.com/MY_PAGE_ID/insights/page_fans/lifetime?format=json&access_token=MY_OFFLINE_ACCESS_TOKEN.

This works ok but... ...offline_access is now deprecated and I want to change my code to obtain access token in the right way. It seems there is no way to autenticate my user programmatically and obtain an acces token which gives me the possibility to perform the above insight data request. So, it seems that with offline_access deprecation, i have no way to perform my insight request! :)

How can I solve this problem? How can I obtain a correct and working access_token? Please help me!

Thank you very much.

2 Answers 2

1

As long as you've enabled the "Deprecate Offline Access" setting in the Settings for your app at developers.facebook.com then all tokens will be automatically issued for 60 days.

On May 1st Facebook will be switching "deprecate offline access" on for EVERYONE so it will become the default setting and all access tokens will be issued across the board with 60 day expiration time.

I'd look at the documentation page "Authentication for devices without access to a browser" which seems to most closely match your use case.

http://developers.facebook.com/docs/authentication/devices/

1
  • From the link you post: "Please note that we are currently testing Device Authentication with a limited number of partners. It is not currently available for general use, and we are not accepting additional applications for access." So, today, I cant'find a way to obtain user access token from my server java engine. It's incredible :( Apr 16, 2012 at 14:54
0

without offline_access the access token returned will still be valid for 60 days ... so one approach would be to trace the expires time and then renew the token as needed... my personal opinion is that asking user to reenter login data every 60 days is more than acceptable

Details here https://developers.facebook.com/docs/offline-access-deprecation/

1
  • My software is an engine (an active process on my server). He has no GUI. How can I perform a new login programmatically? The facebook documentation does not explain it! :( Mar 11, 2012 at 14:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.