从 Facebook SDK v5.4 迁移到 alpha v6 时,我使用 Problems 中的一些 WinForm 客户端示例
看看我如何登录 Facebook。
我的问题:是否可以在没有任何对话框的情况下登录 Facebook?
private void btnLogin_Click(object sender, EventArgs e)
{
// open the Facebook Login Dialog and ask for user permissions.
var fbLoginDlg = new FacebookLoginDialog(AppId, ExtendedPermissions);
fbLoginDlg.ShowDialog();
// The user has taken action, either allowed/denied or cancelled the authorization,
// which can be known by looking at the dialogs FacebookOAuthResult property.
// Depending on the result take appropriate actions.
TakeLoggedInAction(fbLoginDlg.FacebookOAuthResult);
}