Teaching toddler to play with others

My daughter will be 2 in 3 weeks. We go on plays dates here and there with other kids her age and she likes to hoard toys and take everything from the other kids. I try to take it back and give it to her friends and tell her to share but it turns into a tantrum.

I’m looking for some other tips so she can learn to play better with others.

Thanks!