The one you named "3-pin IR LED" is actually an IR receiver.
The IR receiver detects an IR beam if it is pulsed at a frequency about 38 KHz (the exact frequency may differ from one type to another).
In this case, you just need, perhaps by using 555 timer IC, drive your IR LED with pulses around this frequency. You may like changing it a bit to get best sensitivity at the IR receiver.
Usually (the ones I have), the output of the IR receiver becomes low when the pulsed IR beam is detected.
The IR receiver pins are for:
Vcc (positive, say 5V)
GND
Data (it may need an external pull-up resistor, say 4K7)
Since you don't have its datasheet, you likely need discovering the function of the 3 pins by a test (while the IR LED is pulsed).
I suggest you connect, during your tests, a resistor in series with 5V. Its value could be 1K (to limit the current in case of reverse connection). If in all tests the drop on 1K is relatively big and you couldn't discover the data pin, you may decrease it to 470R, but not less than 220R (the IR receiver should certainly work with the latter one if its pins are connected properly). Of course, later you can remove this current limiting resistor when pins are identified.
Note:
Using the IR receiver is a better solution than using an IR photo-diode. The beam detection sensitivity will be independent of the ambient light, practically speaking.