Corona sdk - adapting to Facebook v2.2 permission changes

223 Views Asked by At

In my app I am requesting the "publish_actions" permission only the first time and not every time the user wants to share on FB.

However, because of the changes made by facebook in v2.2, when requesting permissions from our users they can now decide to not grant them or revoke them in the facebook settings page.

"People can also revoke permissions granted to your app in Facebook's interface at any time after they have logged in. It is important that your app regularly checks which permissions have been granted, especially when launching on a new platform." (https://developers.facebook.com/docs/facebook-login/permissions/v2.2#checking)

This is why facebook added the ability to check the permissions the user has granted and denied for your app - in order to detect when to ask for the permissions, when not to, and when to re-request them.

This raises a few questions:

  1. when a user denied the app access, the listener of the showDialog function received the respones with the field isError = true, however there was no explanation what was wrong. I expected something like: (see Handling Missing Permissions section in the previous link)
{ "error": 
        { 
            "message": "(#200) The user hasn't authorized the application to perform this action", 
            "type": "OAuthException", 
            "code": 200 
        } 
    }
  1. Is there a way to check the user's permissions with the facebook library?

  2. Is there a way to re-request the permissions in case they were revoked? According to facebook, simply asking for the permissions will not work without additional info:

If someone has declined a permission for your app, the login dialog won't let your app re-request the permission unless you pass auth_type=rerequest along with your request.

The big question is - is Corona adapting to facebook's v2.2 permission changes?

0

There are 0 best solutions below