1 John 3 gives us a few conditions for answered prayer:
21 Beloved, if our hearts dont condemn us, we have boldness toward God; 22 and whatever we ask, we receive from him, because we keep his commandments and do the things that are pleasing in his sight. 23 This is his commandment, that we should believe in the name of his Son, Jesus Christ, and love one another, even as he commanded.
Like I said..