When you turn on two-factor authentication, you’re asked to choose either text message (SMS) codes or a third-party authentication app as your primary security method.If you choose to use text message (SMS), you’ll be sent a text message (SMS) with a special 6-digit security code each time someone tries logging into your Facebook account from a computer or mobile device we don’t recognize.
https://www.facebook.com/help/www/1756727521321961?helpref=faq_content

