The only point where Jim and I differ slightly is that I'd recommend that you contact your title company first, and (possibly) an attorney second. Keep in mind that the gavel fell already on the foreclosure case, so it's highly unlikely that you'll get any compensation from the proceeds of that closed sale. Perhaps, your only option for any compensation might be via a title insurance claim.
When the primary lien holder files for foreclosure, our understanding is that each other lien is required to be notified. This gives the other lien holders the opportunity to "payoff" the lien being foreclosed to avoid losing their position or return of thier money due.
When the primary lien holder forecloses and the property is sold at the trustee sale, the primary lien holder is the first to be paid. Any money left over will go the the junior lien holders.
Depending on how much the primary lien was owed, and what the auction sale was, (or if the bank bought it back as an REO) in most cases the second and other junior liens get little or nothing back.
It sounds like you may have carried a 2nd lien when you sold your property. If you did, was the transaction conducted through an attorney or title company? Was the lien and title commitment recorded?
If the primary lender was never notified on the second lien, or the 2nd was never recorded, they may have not known who, if anyone, needed to be contacted.
Again, contact your attorney or title company.
Foreclosure Prevention Network
Short Sale and Foreclosure Specialists