Observation of gamma-rays from dwarf galaxies is an effective way to search for particle dark matter. Using 4-year data of Fermi-LAT observations on a series of Milky Way satellites, we develop a general way to search for the signals from dark matter annihilation in such objects. Instead of giving prior information about the energy spectrum of dark matter annihilation, we bin the Fermi-LAT data into several energy bins and build a likelihood map in the "energy bin - flux" plane. The final likelihood of any spectrum can be easily derived through combining the likelihood of all the energy bins. It gives consistent result with that directly calculated using the Fermi Scientific Tool. This method is very efficient for the study of any specific dark matter models with gamma-rays. We use the new likelihood map with Fermi-LAT 4 year data to fit the parameter space in three representative dark matter models: i) toy dark matter model, ii) effective dark matter operators, and iii) supersymmetric neutralino dark matter.