As much as you want your child to behave well and play nicely, remember that most toddlers have trouble sharing. They're attached to their stuff and don't understand that they'll eventually get a shared item back -- they think sharing means giving the toy up for good. The best way to encourage your child to share is to model how sharing is not a loss, but a gain. Try role-playing with some small snacks: Give your kid a handful of animal crackers and you take a handful of pretzels. Explain that if she shares her crackers, you'll share your pretzels -- and she'll get to munch on both. During playtime, you can show how the same is true for toys. Ask if you can use something in her room; if she says yes, praise her and let her play with a pot and spoon from your kitchen or your cell phone. In a few minutes, exchange your items and praise her again. Remind your toddler that if she shares on a play date, her friend will share when you go visiting.
Kids this age are also much more likely to share toys if you give them some control over what's fair game. Before her friend arrives, ask your child to choose a few favorite things that are too tough to share and stow them in your bedroom closet. Once she realizes that her most precious possessions are safe, then she'll probably be a lot more relaxed about lending out the rest of her things.