This paper considers a class of GMM estimators for general dynamic panel models, allowing for cross sectional dependence due to spatial lags and due to unspecified common shocks. We significantly expand the scope of the existing literature by allowing for endogenous spatial weight matrices, time-varying interactive effects, as well as weakly exogenous covariates. The model is expected to be useful for empirical work in both macro and microeconomics. An important area of application is in social interaction and network models where our specification can accommodate data dependent network formation. We discuss explicit examples from the recent social interaction literature. Identification of spatial interaction parameters is achieved through a combination of linear and quadratic moment conditions. We develop an orthogonal forward differencing transformation to aid in the estimation of factor components while maintaining orthogonality of moment conditions. This is an important ingredient to a tractable asymptotic distribution of our estimators. In the social interactions example, orthogonal forward differencing amounts to controlling for unobserved correlated effects by combining multiple outcome measures.