The aim of this work is to develop a dynamic model of stochastic network formation, where the nodes can connect both at random and through a preferential attachment of "friends of friends." In order to obtain mean field approximations we study the behaviour of the average degree and the clustering coefficient in a stationary state; we make use of the generating function method, among others. Through simulations, we demonstrate that depending on the calibration of parameters we obtain three different network structures: empty network, a giant component with few isolated nodes and a sparse network formed by different components. We mainly focus our analysis on the giant component which presents at least some of the key empirical regularities shared by socially generated networks. At the end of this work, we discuss the meaning of introduction of utility functions and their implications on stability and efficiency.