Well, it sounds like a bit of an oversimplified overstatement, which is somewhat true, but also fails to acknowledge other "truths", for the sake of being/sounding emphatically absolute, and in a "nutshell".
Scripture states that faith comes by hearing/understanding God's Word. (Romans 10:17)
(Which does include statements that testify of the importance of prayer and fasting, among many other things.)
Also Scripture indicates that faith is perfected through other things besides prayer alone.
By being beneficially influenced by the grace/gifts of God and through speaking/hearing the truth in love. (Ephesians 4:8-15)
And by applying the measure faith given us by acting/behaving in faithful ways/works. (James 2:14-26)
By love. (Galatians 5:6)
And by having our faith tried and tested. (James 1:2-4 & 1st Peter 1:5-7)
Also, while fasting can indeed greatly aid and empower prayer...there are also other factors involved in realizing prayer's full potential.
Like understanding God's will. (1st John 4:14+15)
Perseverance. (Luke 18:1-8)
Being discreet, respectful, and sincere. (Matthew 6:5:15)
And Spirit inspired. (Romans 8:26+27)
Confidence is only surely good, when it is in The One Who Truly/Surely Is.