I'm using pretty much the exact example code that's found on the page for the Facebook iOS SDK component.
If I remove the ids_for_business
it works fine. The thing is, I need either ids_for_business
or token_for_business
.
I tested the following using the Facebook Graph API Explorer and it works fine.
me?fields=ids_for_business,token_for_business
Here's the permissions I'm requesting:
List<string> readPermissions = new List<string> {
"public_profile","name","email","first_name","last_name", "ids_for_business" };
And here's the method I'm calling:
private void ShowLogin()
{
// If was send true to Profile.EnableUpdatesOnAccessTokenChange method
// this notification will be called after the user is logged in and
// after the AccessToken is gotten
Profile.Notifications.ObserveDidChange((sender, e) => {
if (e.NewProfile == null)
return;
});
// Set the Read and Publish permissions you want to get
loginView = new LoginButton(new CGRect(51, Element.Height / 2, 218, 46))
{
LoginBehavior = LoginBehavior.Native,
ReadPermissions = readPermissions.ToArray(),
};
// Handle actions once the user is logged in
loginView.Completed += (sender, e) => {
if (e.Error != null)
{
// Handle if there was an error
System.Diagnostics.Debug.WriteLine($"Facebook Login Failed! {e.Error.DebugDescription}");
login.FacebookNotAuthenticated();
}
if (e.Result.IsCancelled)
{
// Handle if the user cancelled the login request
login.FacebookNotAuthenticated();
}
else
System.Diagnostics.Debug.WriteLine("Facebook Login Success!");
};
// Handle actions once the user is logged out
loginView.LoggedOut += (sender, e) => {
// Handle your logout
};
View.AddSubview(loginView);
}