hi SG,
The other important point is that the Emitter and Detector should be both IR sensitive devices.
Try this:
In a darkened room, arrange that the Emitter and Detector are pointing towards each other at a distance of 4 inches..
Measure the voltage across the Detector with a voltmeter [DVM] , then place a solid object between the Emitter and Detector, the measured voltage should change.
Tell us what you measure.
E