To alleviate the shortage of charging facilities for electric cars (ECs) and increase the utilization rate of charging facilities for electric buses (EBs), we propose a charging facility sharing strategy that allows charging piles of EBs to be utilized by ECs for a fee during certain time windows. A nonlinear integer programming model is first developed with multiple objectives, including minimizing the average daily acquisition and charging costs of the EB route, minimizing the time costs for ECs waiting for charging, and maximizing the charging revenues from ECs, to collaboratively achieve the vehicle type allowed to be charged at each time window, daily service trips and charging trips allocated to each EB. Subsequently, an algorithm is developed to solve the formulated optimization model by combining the enumeration method and branch and price to address nonlinearity. Finally, a real EB route in Meihekou, Jilin Province, China, is taken as an example to verify the effectiveness of the proposed method. Results show that the charging facility sharing strategy can increase revenue for public transit companies and facilitate the charging of ECs without disrupting the timetable of EBs, which promises a win-win measure for both public transit companies and EC users.