Upvote:0
Can a friend invite you to Canada for a vist or is just a family member who can Invite you?
Any Canadian citizen or even a permanent resident can invite you to Canada.
...how can you proof you have ties with him/her
The person writing the letter must clarify the relationship they have to you. If the relationship can be evidenced by some documents, perfect. Include them as well. If not (friendship typically can't be evidenced by legal documents), it's not a showstopper. It's always up to the CIC to decide about your visa, whether you include a letter of invitation or not.