You must prove you can afford the visit and airfare with your own income. Your friend can offer to support your visit by providing accommodation, take care of your travel/living expenses. This, however, does not eliminate your finances.
Taking a loan to visit is a huge no. It only confirms a weak financial situation + indirectly implies weak employment ties + confirms there are no financial incentives to return to your home country.
Unofficial guide: CAD 1,000 per week of visit + airfare. Earned by you, not borrowed from anyone.
You would want to save up before you apply + you would want to demonstrate you have strong reasons to return to your home country when you apply