This study explores trust dynamics within online social networks, blending social science theories with advanced machine-learning (ML) techniques. We examine trust’s multifaceted nature—definitions, types, and mechanisms for its establishment and maintenance—and analyze social network structures through graph theory. Employing a diverse array of ML models (e.g., KNN, SVM, Naive Bayes, Gradient Boosting, and Neural Networks), we predict connection strengths on Facebook, focusing on model performance metrics such as accuracy, precision, recall, and F1-score. Our methodology, executed in Python using the Anaconda distribution, unveils insights into trust formation and sustainability on social media, highlighting the potent application of ML in understanding these dynamics. Challenges, including the complexity of modeling social behaviors and ethical data use concerns, are discussed, emphasizing the need for continued innovation. Our findings contribute to the discourse on trust in social networks and suggest future research directions, including the application of our methodologies to other platforms and the study of online trust over time. This work not only advances the academic understanding of digital social interactions but also offers practical implications for developers, policymakers, and online communities.