Because of changes to the way Facebook handles sharing, it's no longer possible to share photos directly to Facebook from iPhoto or Aperture. You have a couple of options to share photos to Facebook from these legacy photo apps:
Use Photos for macOS
You can open your existing iPhoto or Aperture library in Photos for macOS and share your photos and videos to Facebook from there. When you're finished sharing, you can go back to using iPhoto or Aperture. Learn more in Updating from iPhoto to Photos for macOS.
Upload photos with a web browser
You can also drag photos from iPhoto or Aperture to your Desktop, and then upload them to the Facebook website using Safari or another web browser.