Facebook External Issue on Nop 3.60

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
8 years ago
Dear all,

My Nop 3.60 issued FB external login and I try to find solution, and now I am not sure it's really Nop 3.60 is out of date FB API? New version is 2.4.

If so, how to update to new version one?

Please read my issued here:

http://stackoverflow.com/questions/31648189/facebook-external-doesnt-get-email-value-in-nopcommerce-3-60/31648488#31648488


Thanks,
8 years ago
I use Nop 3.6 with facebook connect, works fine
8 years ago
hezyz wrote:
I use Nop 3.6 with facebook connect, works fine



If possible could you try to install Nop 3.60 from scratch and create new one FB developer account (Testing user also OK)? Than you will see what happen.

Please host in this hosting server http://www.smarterasp.net, it is 60 Days Free Trials with 1-click install Nop too.
8 years ago
In order to retrieve the email from the latest facebook app(v2.4) you have to explicitly ask for it in your request.
I implemented a method in FacebookProviderAuthorizer.cs class  which does it:

private string RequestEmailFromFacebook(string accessToken)
      {
        var request =
          WebRequest.Create("https://graph.facebook.com/me?fields=email&access_token=" +
                            EscapeUriDataStringRfc3986(accessToken));
        using (var response = request.GetResponse())
        {
          using (var responseStream = response.GetResponseStream())
          {
            var reader = new StreamReader(responseStream);
            var responseFromServer = reader.ReadToEnd();
            var userInfo = JObject.Parse(responseFromServer);
            if (userInfo["email"] != null)
            {
              return userInfo["email"].ToString();
            }
          }
        }

        return string.Empty;
      }
I call this in the ParseClaims() method where claims.Contact.Email is set.

I have uploaded the published plugin that I am using for my store: http://1drv.ms/1JNcdvp
8 years ago
Hi Mihail,

Thanks a lot for this contribution. Fixed. Please see changeset 5bb6815e30ee
8 years ago
[email protected] wrote:
In order to retrieve the email from the latest facebook app(v2.4) you have to explicitly ask for it in your request.
I implemented a method in FacebookProviderAuthorizer.cs class  which does it:

private string RequestEmailFromFacebook(string accessToken)
      {
        var request =
          WebRequest.Create("https://graph.facebook.com/me?fields=email&access_token=" +
                            EscapeUriDataStringRfc3986(accessToken));
        using (var response = request.GetResponse())
        {
          using (var responseStream = response.GetResponseStream())
          {
            var reader = new StreamReader(responseStream);
            var responseFromServer = reader.ReadToEnd();
            var userInfo = JObject.Parse(responseFromServer);
            if (userInfo["email"] != null)
            {
              return userInfo["email"].ToString();
            }
          }
        }

        return string.Empty;
      }
I call this in the ParseClaims() method where claims.Contact.Email is set.

I have uploaded the published plugin that I am using for my store: http://1drv.ms/1JNcdvp


Hi Mihail, does your plugin work with nop v 3.50?
I had the 'no email' issue with the facebook plugin in nop 3.50. I replaced the existing ExternalAuth.Facebook folder in the plugins folder with your new version above, then clicked 'reload list of plugins', but now there is no ExternalAuth.Facebook showing in the list. I can see it in the right place using ftp. Any ideas...?
8 years ago
bho wrote:
In order to retrieve the email from the latest facebook app(v2.4) you have to explicitly ask for it in your request.
I implemented a method in FacebookProviderAuthorizer.cs class  which does it:

private string RequestEmailFromFacebook(string accessToken)
      {
        var request =
          WebRequest.Create("https://graph.facebook.com/me?fields=email&access_token=" +
                            EscapeUriDataStringRfc3986(accessToken));
        using (var response = request.GetResponse())
        {
          using (var responseStream = response.GetResponseStream())
          {
            var reader = new StreamReader(responseStream);
            var responseFromServer = reader.ReadToEnd();
            var userInfo = JObject.Parse(responseFromServer);
            if (userInfo["email"] != null)
            {
              return userInfo["email"].ToString();
            }
          }
        }

        return string.Empty;
      }
I call this in the ParseClaims() method where claims.Contact.Email is set.

I have uploaded the published plugin that I am using for my store: http://1drv.ms/1JNcdvp

Hi Mihail, does your plugin work with nop v 3.50?
I had the 'no email' issue with the facebook plugin in nop 3.50. I replaced the existing ExternalAuth.Facebook folder in the plugins folder with your new version above, then clicked 'reload list of plugins', but now there is no ExternalAuth.Facebook showing in the list. I can see it in the right place using ftp. Any ideas...?

check supported version in Description.txt file. If supported version 3.6 make it 3.5
8 years ago
Thanks anik1991, I did that, and it now shows in Nop list of plugins, but further problem, after click install this message comes.

Method not found: 'Void Nop.Services.Localization.LocalizationExtensions.AddOrUpdatePluginLocaleResource(Nop.Core.Plugins.BasePlugin, System.String, System.String, System.String)'.
8 years ago
Thanks anik1991, I did that, and it now shows in Nop list of plugins, but further problem, after click install this message comes.

Method not found: 'Void Nop.Services.Localization.LocalizationExtensions.AddOrUpdatePluginLocaleResource(Nop.Core.Plugins.BasePlugin, System.String, System.String, System.String)'.
8 years ago
bho wrote:
Thanks anik1991, I did that, and it now shows in Nop list of plugins, but further problem, after click install this message comes.

Method not found: 'Void Nop.Services.Localization.LocalizationExtensions.AddOrUpdatePluginLocaleResource(Nop.Core.Plugins.BasePlugin, System.String, System.String, System.String)'.

Give me the download link from where you download that plug in. So that i can test it in 3.5.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.