She didn't like me talking to other girls.
She didn't like it when I talked to other girls.
(I submitted a separate response for the first two sentences.)
The first sentence above is actually not grammatically correct. The technically correct sentence is this:
"She didn't like my talking to other girls."
However, this sounds very formal. It is not how native speakers talk.
Either sentence is OK in colloquial speech, and both mean almost the same thing. You could also add the following:
"She didn't like when I talked to other girls."
However, there is a slight difference in implied meaning between the two sentences.
"She didn't like me talking to other girls."
This implies that she feels a sense of ownership over me—that she is possessive and controlling. If I talk to other girls, she will probably yell at me and tell me to stop. She will argue, threaten me or try manipulate me.
"She didn't like it when I talked to other girls."
This focuses on "it" rather than "me," so it feels like she is insecure or jealous, but not controlling or possessive of me. She may or may not say anything to me about it. I may only know she feels this way because she told a friend who told me. Or perhaps I notice that she bites her lip or gets tears in her eyes when I talk to other girls. If she says something to me, it is more likely to be a question or a statement designed to get more information or to reassure her that I don't like the other girls (e.g., "You and Veronica talked for a long time tonight..." or "Do you think Veronica is prettier than I am?")