Virtual farming has turned into a profitable industry. Facebook is on course to earn $1 billion in revenue this year from social gaming, according to Kevin Ryan, former chief executive of online advertising firm DoubleClick. Most of that revenue will come from advertising, but some also includes the sale of Facebook Credits, which allow users to buy items for games on the social network. Research firm eMarketer estimates that ad spending on Facebook will exceed $4 billion this year in total, with a large segment of that coming from ads on games. Zynga, the largest Facebook game developer and owner of Farmville, field for a $1 billion initial public offering on Friday.