I can't prove this with complete generality but I can weaken the assumptions on the answer above - we merely assume that $f$ has a zero, not that $f(0)=0$. Hopefully someone else can use the ideas to finish the proof off. Let $f$ be a non-constant solution to the functional equation and set $c:=f(0)$.
Firstly, the given solution will follow if $f$ is injective. Indeed, in this case we have that $x+f(y)=y+f(x)$ for all $x,y\in\mathbb R$, so simply set $y=0$.
Next, assume that there exists $\epsilon>0$ such that $(-\epsilon,\epsilon)\subset f(\mathbb R)$. Differentiating the functional equation with respect to $x$ gives
$$f'(x+f(y))=f'(x)f'(y+f(x)) \qquad (1)$$
and so if $f'(x_0)=0$, $f'(x)=0$ for all $x\in(x_0-\epsilon,x_0+\epsilon)$. It quickly follows that either $f'\equiv0$, contradicting the fact that $f$ is not constant, or $f'(x)\neq0$ for all $x$. Rolle's theorem then implies that $f$ is injective.
Now assume that $f$ has a zero. By continuity there exists $\delta>0$ such that $[0,\delta]\subset f(\mathbb R)$ or $[-\delta,0]\subset f(\mathbb R)$. In either case, it will follow that $(-\epsilon,\epsilon)\subset f(\mathbb R)$ for some $\epsilon>0$. The proofs of each case are almost identical so I will only prove the case where $[0,\delta]\subset f(\mathbb R)$. By $(1)$ it follows that if $f'(x_0)=0$, $f'(x)=0$ for all $x>x_0$. Set $x_1:=\inf\{x\in\mathbb R\,:\,f'(x)=0\}$. If $x_1=\infty$ then $f$ is injective and if $x_1=-\infty$ then $f$ is constant, so we assume $x_1\in\mathbb R$.
If $M:=f(x_1)$ then $M$ is either the global maximum or minimum of $f$. Indeed, $f$ is monotone on $(-\infty,x_1)$ and constant on $[x_1,\infty)$ so $f$ must either increase or decrease to $M$. If $M=\max f$, then $M\ge\delta>0$ and so if $z_0$ is a zero of $f$ then $z_0<x_1$. But if $x<z_0$, $f(x)<f(z_0)=0$, so by continuity $f(\mathbb R)$ contains an interval $(-\epsilon,\epsilon)$.
Suppose now $M=\min f$. Then $M\le0$; if $M<0$ then again we have $(-\epsilon,\epsilon)\subset f(\mathbb R)$, so assume $M=0$. By putting $x=y=0$ in $(1)$ we get $f'(c)=f'(0)f'(c)$. If $c<x_1$, then $f'(c)\neq0$, so $f'(0)=1$. But $f$ is either decreasing or constant, so this is a contradiction. Hence assume $c\ge x_1$. Then $f(c)=0$, and so
$$c=f(0+f(c))=f(c+c)=f(2c).$$
But $c=f(0)\ge0$, so $2c\ge c$ and hence $c=f(2c)=0$. But @universalset already provided a solution to the case where $c=f(0)=0$, so we are done. (In fact, the conclusion we reach contradicts the assumption that $x_1<\infty$, but this is not so important.)
Obviously this involves the non-trivial assumption that $f(x)=0$ for some $x\in\mathbb R$. We still need to prove this is the case. Assume for a contradiction that $f>0$ everywhere (the negative case will be analogous). If $\inf f=0$ then essentially the same proof as above implies the existence of $x_0$ such that $f(x)=\max f$ for all $x\ge x_0$ and $f'(x)>0$ for $x<x_0$. However, it is potentially possible that $\lim_{x\to-\infty}f(x)=0$ in which case the argument breaks down. I also have not considered the case where $f(x)\ge\epsilon>0$ for all $x\in\mathbb R$. Perhaps someone else can give it a go. If it helps, one may show that $f'(0)\neq0$ and that $f'(x-c)=1/f'(0)$ whenever $f'(x)\neq0$. I did not use this fact so did not include its proof, but it is straightforward enough using $(1)$ and the fact that $f'$ is not identically zero.