Specifically Zynga games, but probably applies to other FB/MySpace games: Most of them are comprised of Flash/Action Script along with MySQL,XML and then whatever server-side language they use.
So a good bet, would be to start researching these, and learning what you can.
A lot goes into a game of any kind, stories to be created, designs to be done, art work to be created, game to be developed, so on and so forth.
Perhaps also do some research into game development in general, to get a feel for what it's like.
If you still want to go through with it, start like A_Bertrand says; off small with something as basic as a guess my number, then gradually work your way up.
The alternative, pay someone to do everything for you, but that could become quite costly, and there's no fun in that.
Good luck, with your project.
-DJK.