Extremely Confusing Automatic Facebook to Facebook Recovery Issues

Please take a look at the Tinder Facebook Login error recovery image below.

If user changes password or revokes application permission. The Facebook SDK will automatically pop up an error dialog as shown below.

enter image description here

If the user clicks OK, the app will redirect the app to Facebook to invite the user to accept permissions again.

enter image description here

This behavior / Dialog is provided automatically by the Facebook SDK

To make it easy to subscribe to best practices, the SDK provides an FBSDKGraphErrorRecoveryProcessor that can handle errors for you, such as automatically displaying alerts or dialogs. See His docs link for details.

FBSDKGraphErrorRecoveryProcessor

Please note that Facebook recovery attempts may present a user interface or even trigger (for example, to login). Any such work is sent to the main thread (so your request handlers can then run on the main thread).

I also encounter this kind of behavior in my application if the User canceled my application or changed their password. The Facebook SDK will automatically present a login prompt dialog

enter image description here

Here is the problem, I have no idea where to specify readPermissions

enter image description here

Here is my code that automatically launches a dialog if the User has changed their password or revoked the app permission on Facebook.

var request: FBSDKGraphRequest = FBSDKGraphRequest(graphPath: "me", parameters: Constants.GRAPH_REQUEST_PARAMETER);

request.startWithCompletionHandler { (connection: FBSDKGraphRequestConnection!, result: AnyObject!, error: NSError!) -> Void in
    if error == nil {
        println("No Error")
    }
    else {
        println("Error")
    }
}

      

My question is, how can I specify the required read permissions for the Dialog to prompt for it?

Where can I specify it?

I have no control over it like I do when I use FBSDKLoginManager

where I can just pass permissions like the code below since the dialog itself is displayed automatically via Facebook SDK

+3


source to share


1 answer


Change this

["public_profile","user_friends","email","user_birthday"]



to that

["email"]

0


source







All Articles