The fifth generation (5G) telecommunications standards are being developed to meet the growing demands for high-speed wireless networks (i.e., few tens of Gigabits per second). The 5G standard stems largely from an increasing number of users and plethora of different devices, collectively referred to as smart devices, connecting to a network as part of Internet-of-Things (IoT). A few potential technologies have emerged for 5G such as millimeter waves, massive multiple-input multiple-output, and small cell communications. Although these technologies would satisfy the requirements of 5G, there is a complementary alternative wireless technology of optical wireless communications (OWC), which is being considered. As part of OWC, visible light communications (VLC) and optical camera communications (OCC) are the most attractive options for 5G networks and beyond. VLC with huge frequency spectrum integrated with IoT can open up a wide range of indoor and outdoor applications as part of future smart environments. This paper provides an overview of the all-optical IoT (OIoT) focusing on VLC and OCC based potential applications and challenges as part of 5G standards.