Oxford Learner's Dictionary in:
- at a point within an area or a space
- a country in Africa
- The kids were playing in the street.
- It's in that drawer.
- I read about it in the paper.
- within the shape of something; surrounded by something
- She was lying in bed.
- sitting in an armchair
- Leave the key in the lock.
- Soak it in cold water.
Oxford Learner's Dictionary along:
- from one end to or towards the other end of something
- They walked slowly along the road.
- I looked along the shelves for the book I needed.
- in a line that follows the side of something long
- Houses had been built along both sides of the river.
- at a particular point on or next to something long
- You'll find his office just along the corridor.
"along" means "at various places on the length of" while "in" just means "in". "along" works best with plural nouns. "in" doesn't say whether they're bunched up in one place or spread out in many places within the corridor. "in" can be used for singular or plural nouns.
There were children in the corridor.
There were children along the corridor.
There was a child in the corridor.
*There was a child along the corridor.
The first three sentences are fine. The last sentence doesn't work because one child can't be in various places in corridor at the same time. In the example of the office, it is implying that you would walk along the corridor to find it.