http://www.cic.gc.ca/english/visit/letter.asp
You will find all sorts of answers here. A person cannot sponsor a friend. You can give them an invitation to include with their application package, but it is up to the potential visitor to prove they can support themselves, that they have a compelling reason to come to Canada, and MOST OF ALL, that they will leave before the expiry of the visa. Don't get caught up in proving what great friends you are as that just strengthens their ties to Canada. The visitor has to show they are established in their country, earn a good wage and have a steady job. Their previous travel history not only shows their pattern of returning home after a holiday, but also that they have the funds for travel. Think of all the things your friend has to pull her/him back home.