Enable Rating/Likes programmatically in sharepoint 2013
1.Enable Rating/Likes
Assembly assembly = Assembly.Load("Microsoft.SharePoint.Portal, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c");
Type reputationHelper = assembly.GetType("Microsoft.SharePoint.Portal.ReputationHelper");
MethodInfo method1 = reputationHelper.GetMethod("DisableReputation", BindingFlags.Static | BindingFlags.NonPublic);
method1.Invoke(null, new Object[] { postsList });
MethodInfo method2 = reputationHelper.GetMethod("EnableReputation", BindingFlags.Static | BindingFlags.NonPublic);
// "Likes" or "Ratings" as per your requirement.
method2.Invoke(null, new Object[] { postsList, "Ratings", false });
postsList.Update();
2.Build-In Fields about Rating/Likes

3.Set Rating/Liking Programmatically

浙公网安备 33010602011771号