Mass Air Flow Censor on 2001 Nissan Sentra

I bought this about 48hrs ago and it started to act funny, like it was not getting enough fuel then it died. I had the car towed home and I got to running again and I drove to the parts store and they put their computer on it and they said it was the mass air flow censor, well I put a new one in it and it did not fix the problem. Its still acting like it is not getting fuel what else can it be?

Asked by for the 2001 Nissan Sentra
first of all, a free code pull never identifies a failed part, just a failed system.

if there is a code for the mass air flow system, you need to have it scoped and the wiring and all the hoses checked for proper operation.

you wasted the money on the sensor, now get a proper diag for the failure.