My dd (now 8) is a poster child for extrovertism. Every stranger in the world is a friend she hasn’t met yet (and intends too!). Every time she discovers things in life designed around extroverts (music festivals, chances to perform, back-packing) she is over the moon with (loud) delight!
Even as a toddler her favourite thing was going to our local shopping strip. She knew everyone, and came home chock full of stories, food and gifts from shopkeepers and half the customers.
I’ve watched her walk along the beach (at 4yo), slip her hand into a young man’s and walk along chattering. He was surprised but pleased and went with it for about 30 metres. Then he snapped into reality and dropped her hand like a hot potato and looked around in a panic. I reassured him it was her MO and that he wasn’t going to get arrested.
I worried about it in general though, and sought advice on how best to guide her. So the two main things I was told are these: firstly as said by pp, Stranger Danger really isn’t the best protective strategy. Focus your teaching on her body autonomy (private areas, etc) and strategies for alerting safe adults if something makes her uncomfortable (you can define ‘uncomfortable’ differently as she gets older). There are loads of great resources online for this, with particular phrases to teach even tiny kids.
Secondly, which gave me great comfort, was this. Natural extroverts are actually really good at reading people. It’s their ‘thing’. They become expert very young. Better than older people who may be lesser extrovert or introverts. So their antennae are very sensitive, to personality (and personality change), to people being ‘off’ or secretive or deceptive. I was told not to confuse my dd’s friendliness for naïveté or stupidity. If anything, trust her ‘reading’ of people and support her in it (of course while being a careful parent who observes her interactions). It’s important to believe her if she takes an instant dislike to people, and not force her to be ‘polite’ or affectionate. Even if it’s embarrassing for you (like if it’s a family member or neighbour, etc).
In essence, see your dd’s open and friendly nature as a gift. She will likely have a rich life, many friends and do well at work. In the same way you’d have to give an introvert child the tools for dealing with a busy loud world, you’ll have to give your extrovert child tools for building her inner voice (look up ‘external locus of control’), using her intuition and remembering there are shy (and damaged) people in the world who will not appreciate her approach or who may take advantage of it.
You won’t have to practice ‘screaming for people’s attention’, on the upside, it’s their natural standby position! 
BTW, the toilet thing you mention is a red herring, in my opinion. At that age it’s all about toilets.