我正在尝试学习如何使用Facebook iOS SDK for Xamarin。试图制作一个非常简单的应用程序,只需登录,然后在标签中显示您的名字。但是我收到此错误消息,我在互联网上找不到任何有关的信息。当我尝试使用SDK附带的一些示例应用程序时,我也收到此错误消息。错误消息如下:
这是我在ViewController中添加的内容,其他所有内容都未触及标准项目:
private string [] ExtendedPermissions = new [] { "user_about_me", "public_profile", "read_stream"};
FBLoginView loginView;
IFBGraphPerson user;
public override void ViewDidLoad ()
{
base.ViewDidLoad ();
loginView = new FBLoginView (ExtendedPermissions) {
Frame = new RectangleF(85, 20, 151, 43)
};
loginView.FetchedUserInfo += (sender, e) => {
user = e.User;
LoginLabel.Text = user.GetName();
};
View.AddSubview (loginView);
}
这是在AppDelegate中:
public override bool FinishedLaunching (UIApplication app, NSDictionary options)
{
FBSettings.DefaultAppID = FacebookAppId;
FBSettings.DefaultDisplayName = DisplayName;
return true;
}
public override bool OpenUrl (UIApplication application, NSUrl url, string sourceApplication, NSObject annotation)
{
// We need to handle URLs by passing them to FBSession in order for SSO authentication
// to work.
return FBSession.ActiveSession.HandleOpenURL(url);
}
public override void OnActivated (UIApplication application)
{
// We need to properly handle activation of the application with regards to SSO
// (e.g., returning from iOS 6.0 authorization dialog or from fast app switching).
FBSession.ActiveSession.HandleDidBecomeActive();
}
如果有人知道这个错误意味着什么,我将非常感激!