Updating Sitecore Social Connected Module 2.1

The proplem

Check this post before you start with this one, so you can have an idea what is the problem.

In short this module uses deprecated facebook keys, and these keys are hardcoded in the DLLs of this application.

This is not a problem with the socail connected module. It is caused by changes in these social networks APIs.

The solution

  1. Use any .net reflector, open Sitecore.Socail.Facebook.Dll, create a project from the source code.

  2. Fix the errors in the project by adding the required references and rebuild the project.

  3. Go to this function GetAccountBasicData in FacebookProvider.cs

  4. Remove the code inside the function, and add the following code instead.

  5.     string item; 
        Assert.IsNotNull(account, "Account parameter is null");
        IDictionary<string, object> accountData = this.GetAccountData(account, "/me");
        if (accountData == null)
            return null;
        string str = string.Concat(accountData["name"]);
        AccountBasicData accountBasicDatum = new AccountBasicData()
            Account = account,
            Id = accountData["id"] as string
        AccountBasicData accountBasicDatum1 = accountBasicDatum;
        if (accountData.ContainsKey("email"))
            item = accountData["email"] as string;
            item = null;
        accountBasicDatum1.Email = item;
        accountBasicDatum.FullName = str;
        return accountBasicDatum;