This only happens when you log into facebook on an unknown computer. If you can't use the facebook app or code generator, facebook will send your phone a text message with the code.
[header] How to activate 2 step verification in facebook [title] Install the facebook app on on your mobile phone. [step] Facebook uses a code generator tool in the facebook app as a two-factor security system. You'll be prompted to open the facebook app and enter the code from the code generator.