You need to hire the best criminal defense attorney you can afford to defend this charge. Burglary is a serious felony offense. It sounds like you have valid defenses that must be asserted by your attorney. I can't tell from your question if the charge is pending or it's over. Either way, get legal advice to assist you.
I am trying to give you a general answer to your question. We do not have an attorney-client relationship by this response on the avvo website. I have not been retained to represent you. I am licensed to practice law in Kentucky and in federal court in this state and the Southern District of Indiana. You need to seek legal advice from an attorney licensed to practice in your area..
If you were invited into the home, it is not Burglary. If the case is over, you need to get an attorney to file an appeal ASAP. Depending on your state, you may be able to get your "friend" to tell you that he only said what he did because he was threaten with being charged with a crime on tape without him knowing it.