iOS Request Friend

Hi!

I’ve a problem, with iOS and Facebook.

When my user loggin into facebook inside my app I save some information to make next facebook request without ask login (user id, token, expiration…)

When app is opened (after was closed or killed) I read this saved information to know if user is just logged (check also token validity), and if user is logged I use this code:

F.facebook.request("me/friends", "GET", {fields="id,name,picture"})

In this way refresh friend list every time app is opened.

On Android this worked fine! But on iOS no, with this error:

ERROR: IOSFBConnect::Request(): cannot process a Graph API request without being logged in. Please call facebook.login() before calling facebook.request().

So, why this different scenario? I don’t call facebook.logout()…

Maybe on iOS facebook disconnects user after app is closed/paused? 

The only relevant different between Android and iOS device is that on Android device I use browser to interact with facebook (I’v not installed Facebook app) while on iOS I’ve installed Facebook app.

Thank you!

My Environment:

Mac OS: 10.10.5 Yosemite Corona: Version: 3.0.0 / Build: 2015.2802 Compiling for iOS 9.2 on iPhone 4

After several test I noticed that on iOS, after user close/kill app, facebook.getCurrentAccessToken() is always null, while on Android is valorized!

No one has had such a problem?  :frowning:

No one has had such a problem?  :frowning: