# Extending affine maps defined on weakly closed sets to the whole topological space

Given $C$ a weakly closed convex subset of a (real) Banach space $B$, with $0\in C$ and $\varphi:C\longrightarrow \mathbb{R}$ weakly continuous, with $\varphi(0)=0$, can we extend $\varphi$ to a $\widetilde{\varphi}\in B^*$ ?

I guess not, in general. Is it true if $C$ is weakly compact?

No. Let $B=\ell_2$ and let $C$ be a compact convex symmetric subset of $\ell_1$ whose span is dense in $\ell_1$. Let $\phi$ be the restriction to $C$ of any element of $\ell_\infty$ that is not in $\ell_2$.