Full disclosure, I haven't tried this myself so perhaps someone who has can confirm or deny.
Looking at the cameras (assuming you meant the rear camera) online ([https://www.unionrepair.com/replacement-for-iphone-8-plus-rear-camera.html?currency=USD&sl=en|iPhone 7Plus] / [https://www.unionrepair.com/replacement-for-iphone-7-plus-rear-camera.html?currency=USD&sl=en|iPhone 8Plus]), they don't appear to have the same flex cables. The 8Plus cables are longer. Also, Apple has a tendency to make parts slightly different, either with the pinouts of the connectors or the actual connectors themselves even if the internal guts are the same.