I slightly disagree with the above answer as when the verb recommend is used as a transitive verb, its object should be something that is recommended/suggested/advised (to use/read/watch, etc).
- I recommended him to the CEO.
It is obvious that the above sentence means I asked the CEO to consider hiring him.
Let's say the CEO is a female and if you use:
- I recommended him her/I recommemded her him.
Which one would you use for the No.1 sentence? It is very difficult to tell who was recommended and to whom who was recommended. Of course, the second one should be used (based on the context) as IO (indirect object/her) should be placed before DO (direct object/him).
If you compare No. 2 sentence with the follwoing:
- I recommnded him to her.
It is far less confusing than No. 2.
There is no single usage mentioned in Oxfod Online Dictionary that shows "recommend + IO + DO" construction".
I have "googled" some phrases and there seems to be no big difference in monotransitive usages (taking only DO) and ditransitive usages (taking IO and DO).
"Recommended a book to me": 45,300 hits.
"Recommended me a book":
"Recommended a book to him": 99,700 hits. "Recommended him a book": 97,200 hits.
"Recommended a book to her": 81,600 hits. "Recommended her a book": 32,100 hits.
However, if you change the DO to "the movie" and IO to "him/her", seemingly strange hit numbers turn up.
"Recommended the movie to me": 49,600 hits.
"Recommended me the movie": 64,500 hits.
"Recommended the movie to him": 34,800 hits. "Recommended him the movie": only 3 hits.
"Recommended the movie to her": 37,200 hits. "Recommended her the movie": 0 hits.
Also, 0 hits for "Recommended them the movie" and only 8 hits for "recommended us the movie" while 30,500 hits for "recommended the movie to us".
The same phenomenon is taking place with the verb "suggest" whose usage is considered similar to "recommend".
"Suggested an idea to me": 45,300 hits.
"Suggested me an idea": 17,800
"Suggested an idea to him: 34,100 hits.
"Suggested him an idea": 3,270 hits
"Suggested an idea to her: 32,700 hits.
"Suggested her an idea": 7,010 hits
You could use either "Recommend a book to me" or "Recommend me a book" as "Recommend me something" seems to have become rather popular as shown in the Google search.
However, if you change the IO to "him/her/us/them", it is a different story.
It is rather idiomatic to use "recommend" as a "ditransitive" verb when using "me" as an IO (even "him" for a book). However, we had better use the verb "recommend" as a "monotransitive" verb that takes only DO when using other IO's than "me" (or him for a book).