Social network analysis has attracted researchers across research areas such as social science and computer science to analyze the discovery of web services from social networks. The social network has immense application potential to real-world problems like viral marketing, fake news detection, the study of political blogs, information diffusion, link prediction, and community detection. The influence maximization (IM) problem finds a set of most influential users in a social network to maximize the spread of any information, idea, innovation, and product adoption. With the rapid growth of the social network, the IM problem faces two major challenges like effectiveness and efficiency. We propose a Community-based Context-aware Influence Maximization algorithm using Integer Linear Programming (C2IM-ILP) to tackle both the challenges. A community-based integer linear programming (ILP) solution is presented to reduce the search space of the solution. Next, a contextual feature user’s interest and product information are utilized to improve seed effectiveness, and an integer linear programming solution is presented to identify influential users. We have also analyzed the classical ILP solution for the target set selection problem (TSSP) and IM problem. Finally, experimental analyses on real-world social networks have been performed to validate the performance of C2IM-ILP against state-of-the-art algorithms.