In recent years, there has been a growing interest in developing next point-of-interest (POI) recommendation systems in both industry and academia. However, current POI recommendation strategies suffer from the lack of sufficient mixing of details of the features related to individual users and their corresponding contexts. To overcome this issue, we propose a deep learning model based on an attention mechanism in this study. The suggested technique employs an attention mechanism that focuses on the pattern’s friendship, which is responsible for concentrating on the relevant features related to individual users. To compute context-aware similarities among diverse users, our model employs six features of each user as inputs, including user ID, hour, month, day, minute, and second of visiting time, which explore the influences of both spatial and temporal features for the users. In addition, we incorporate geographical information into our attention mechanism by creating an eccentricity score. Specifically, we map the trajectory of each user to a shape, such as a circle, triangle, or rectangle, each of which has a different eccentricity value. This attention-based mechanism is evaluated on two widely used datasets, and experimental outcomes prove a noteworthy improvement of our model over the state-of-the-art strategies for POI recommendation.