Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Facebook auth.extendssoaccesstoken error code 10

In our Facebook app developer insights, we're seeing consistent daily errors for method auth.extendssoaccesstoken with error code 10, 'Application does not have permission for this action'. We are on the latest SDK with a near exact implementation of the current iOS integration guide. Searching Google, SO and Facebook Developers for the error and/or anything to do with extend token provided no results. Is there something I should be enabling on the Facebook app?

like image 339
Zaid Daghestani Avatar asked Oct 05 '22 20:10

Zaid Daghestani


1 Answers

After further investigation into the Facebook SDK source, I believe I have a solid lead.

  1. Some, not all, of our users are getting the this error
  2. The previous behavior of auth.extendSSOAccessToken was depended upon the app receiving the 'offline_access' permission from the user.
  3. The facebook-ios-sdk does not touch the 'offline_access' permission anywhere in it's code.
  4. The application "not having permissions" for extending the access token suggests that the method still depends on the application getting the 'offline_access' permission. The only change is this now happens silently.

The Conclusion: The app is not being granted the 'offline_access' permission in one of the many different methods of authentication. The iOS SDK attempts authentication in the following manner:

  1. iOS Integrated Facebook Dialog
  2. iOS Facebook App "Fast App Switch"
  3. Login through Safari
  4. Facebook SDK UIView Login Dialog

4 seems outdated and unlikely, and we're getting ~17% error rates which narrows it down to 1 or 3, since 2 is definitely still widely used.

Will update after further analysis.

Update 1 Using Facebook's insights and our git history, I believe the issue occurs when the user authenticates using the iOS6 Integrated Facebook Dialog (method 1). Came to the conclusion because the error appeared on Facebook Developer Insights after the iOS6 release and we released a version of the app that used SDK 3.1

Will update after testing

like image 114
Zaid Daghestani Avatar answered Oct 13 '22 10:10

Zaid Daghestani