All perfect praise be to Allaah, The Lord of the Worlds. I testify that there is none worthy of worship except Allaah, and that Muhammad is His slave and Messenger.
Giving advice is part of religion and whoever gives a piece of advice which includes committing a sin is sinful because he is cheating in his advice while the Prophet said: “Whoever advises his brother (in Islam) to do something while knowing that another matter is better than it, he has indeed betrayed him.” [Abu Daawood] Moreover, the Prophet said: “Whoever cheats is not one of us.”
Hence, if the advised person commits a sin because of acting according to that advice, then the adviser is his partner in the sin as the Prophet said: “…and whoever calls to misguidance will have upon him the sin like the example of the sin of those who followed him without decreasing anything from their sins.” [Muslim] Allaah Says (what means): {That they may bear their own burdens [i.e. sins] in full on the Day of Resurrection and some of the burdens of those whom they misguide without [i.e. by lack of] knowledge. Unquestionably, evil is that which they bear.}[Quran 16:25]
Indeed, Al-Bukhari entitled a Chapter in his Saheeh “Chapter: The sin of whoever invites others to misguidance or institutes an evil custom, for the Saying of Allaah (which means) {…and some of the burdens of those whom they misguide…}”
Allaah Knows best.