<human>: Can you summarize the given text in a few sentences?

I was walking the streets in Birmingham, AL with a friend when officers stopped us. We came up to them and they began talking to my friend asking him all these questions while I stood.

I asked if I was being detained, they said yes, I asked under what charge and they said "we will see."

Then one of the cops, while walking back a while says he finds a bag of marijuana. It looked like <1 1 gram. 

He then arrests both of us for possession.

He takes all of the things out of my pockets, checks me, etc.

I say that is not mine, it was not in my possession, I don't know where it came from. 

He cuffs me tells me to shut up, and brings me to the station where my parents pick me up.

So my parents are pissed and want to spend the least amount of money as possible. The weed was not in my possession, how was I then arrested?

If you could please guide me to information, or give me some tips or experiences, I would be grateful.
As you can guess, I am stressed out.
<bot>: Charged for marijuana possession although weed was about 50 feet away from me. Said it was not mine, still arrested for it.