People commonly say that they know famous people such as a president, a well-known CEO or a member of the press. However, there isn't true fellowship between two people if they don't know you even though you may know them. It is because 'knowing' someone carries the sense of having a mutual fellowship. In the same way, you cannot say that you know God just because you go to church. Knowing God is to obey the words in the Bible.
"If we say that we have fellowship with Him and yet walk in the darkness, we lie and do not practice the truth" (1 John 1:6).