Nonlinear difference equations via critical point methods