Without a doubt, no.
Intention, Form and Matter
The Church teaches that a sacrament of the Church consists in three necessary things:
The intention to effect the sacrament according to the mind of the Church on the the part of the minister thereof (i.e. not with some other intention alien to the purpose of the sacrament and to the Church).
The valid form (i.e. the prescribed words used during the administration of the sacrament: e.g. "I baptize you in the name of the Father and of the Son and of the Holy Ghost" for the Sacrament of Baptism).
The matter of the sacrament (the 'stuff' involved in constituting the sacrament validly: e.g. unleaved bread and grape wine for the Sacrament of Holy Communion).
In the case of the priest, he needs to use the valid form (words) of absolution. We can assume your priest knew the form and said it correctly. However, he did not have the matter of the sacrament, which are, in the case of confession: contrition for the sins committed (regret and sorrow for having sinned against God) and auricular confession of those sins.
A Few Reasons This Needs to be the Case
Scripture says, "If we confess our sins, he is faithful and just, to forgive us our sins, and to cleanse us from all iniquity" (1 John 1:9). Stopping by for the priest to pray over you is not the sacrament of confession, since he can't grant God's absolution without a confession; for the same reason a man or woman cannot bring about the sacrament of Matrimony without the equal consent of their partner. This is better understood when one realizes that the priest is a mediator of God's mercy, which implies that he has one hand to Christ and the other to you: you must participate—that's why you are there.
When Christ endows the Apostles with this priestly power of forgiving sins, he notably says "whose sins you shall hold bound, they shall remain bound" (John 20:23). This necessitates a discrimination between a confession for which he can grant absolution, and one for which he cannot—which requires his hearing the sins. Such an example might be if the penitent isn't... so penitent, since clear indication that the penitent is sorry for his sins is required for the priest to give absolution.
This is something about which the bishop might need to be alerted. This is quite a serious problem.