I'm attempting to use ModernCV's \social tool with the stackoverflow logo.
Following this advise, I uploaded this version of moderncv.cls to my project: http://tug.ctan.org/tex-archive/macros/latex/contrib/moderncv/moderncv.cls.
I added the stackoverflow logo to my project as a jpg image title SO.jpg.
I've tried adding the following to line 270 of the cls file, right before the line that says \collectionnew{socials}:
\newcommand*{\stackoverflowsocialsymbol} {\includegraphics[width=0.33cm]{SO.jpg}~}
I've also tried replacing line 335, which originally has \newcommand*{\stackoverflowsocialsymbol}{} to \newcommand*{\stackoverflowsocialsymbol} {\includegraphics[width=0.33cm]{SO.jpg}~}.
What am I doing wrong? I'm working Overleaf.
Here is my example tex file:
\documentclass[12pt,a4paper,roman]{moderncv}
\moderncvstyle{classic}
\moderncvcolor{black}
\firstname{kilo}
\familyname{Joules}
\social[linkedin]{kilojoules}
\social[stackoverflow][stackoverflow.com/users/3474956/kilojoules]{kilojoules}
\begin{document}
\makecvtitle
The LinkedIn icon shows up fine, but the StackOverflow icon is missing.
\end{document}

\stackoverflowsocialsymbol already defined. When I do the second approach, replacing the definition ofstackoverflowsocialsymbolon line 332, there are no errors. In all cases, the stackoverflow symbol does not appear. – kilojoules Dec 06 '21 at 19:00moderncvalready has the stackoverflow symbol included. – Willie Wong Dec 06 '21 at 19:06Document Class: moderncv 2021-07-28 v2.2.0 modern curriculum vitae and letter document class, built usingTeXLive 2021as the distribution of choice on Overleaf. – Willie Wong Dec 06 '21 at 19:07