  This paper concerns an optimal control problem $(P)$ related to a nonlinear
Fokker-Planck equation. The problem is deeply related to a stochastic optimal
control problem $(P_S)$ for a McKean-Vlasov equation. The existence of an
optimal control is obtained for the deterministic problem $(P)$. The existence
of an optimal control is established and necessary optimality conditions are
derived for a penalized optimal control problem $(P_h)$ related to a backward
Euler approximation of the nonlinear Fokker-Planck equation (with a constant
discretization step $h$). Passing to the limit ($h\rightarrow 0$) one derives
the necessary optimality conditions for problem $(P)$.
