OAuthWebSecurity with Facebook not using email permission as expected

后端 未结 7 1147
不思量自难忘°
不思量自难忘° 2020-12-13 16:24

Using the new OAuthWebSecurity for authenticating with Facebook, I added the email permission on my Facebook application. Now, as I can read, I need to define a scope to be

7条回答
  •  误落风尘
    2020-12-13 17:12

    It can be done...like this:

    var fb = new Dictionary();
    fb.Add("scope", "email,publish_actions");
    OAuthWebSecurity.RegisterFacebookClient(
    appId: ConfigurationManager.AppSettings["FacebookAppId"],
    appSecret: ConfigurationManager.AppSettings["FacebookAppSecret"],
    displayName: "FaceBook",
    extraData: fb);
    

提交回复
热议问题