Both are ok. The only time (at least that I know of) you can't use the second kind of construction is when the thing somebody is giving away is expressed with a pronoun. For instance: *Send the old man it.
New words, one handy idiom, and a 2-minute quiz — delivered to your inbox to keep your streak alive.