See the section Extended Permissions in this link.
According to this, xmpp_login
is the read permission, not the write/publish permission. So you should add that the readPermission
Question
My app needs to send a private message to the user's Facebook friend. The user needs to grant the XMPP permission before my app can do this.
[[FBSession activeSession]
requestNewPublishPermissions:[NSArray arrayWithObjects:
@"publish_stream",
@"xmpp_login",
nil
]
defaultAudience:FBSessionDefaultAudienceEveryone
completionHandler:^(FBSession *session, NSError *error) {
}
];
The above code will pop up this alert view as expected:
However, even before tapping any button, this warning is printed out in the debug log:
FBSDKLog: FBSession: a permission request for publish or manage permissions contains unexpected read permissions
Surely enough, after tapping the "OK" button, the completion handler comes back with an error, containing the same warning. I understand that the Facebook API requires asking for read and write permissions separately, but the xmpp_login permission seems to need both read and write at the same time. I'm at a dead end here.
Solution
See the section Extended Permissions in this link.
According to this, xmpp_login
is the read permission, not the write/publish permission. So you should add that the readPermission