1. A method for adding friends comprising: scanning to acquire a two-dimension code shared by a two-dimension code sharing user; parsing the two-dimension code to obtain a user identifier of the two-dimension code sharing user; judging a relationship between a user identifier of a two-dimension code scanning user and the user identifier of the two-dimension code sharing user; if the relationship between the user identifier of the two-dimension code scanning user and the user identifier of the two-dimension code sharing user is not a friend relationship, entering a friend adding interface and adding the two-dimension code sharing user as a friend; wherein after the entering a friend adding interface and adding the two-dimension code sharing user as a friend, the method further comprises: sending a message to the two-dimension code sharing user to notify the two-dimension code sharing user of being added as a friend by other user, so that the two-dimension code sharing user makes a corresponding operation for this friend adding; wherein the method further comprises: displaying a personal page of the two-dimension code sharing user, if the relationship between the user identifier of the two-dimension code scanning user and the user identifier of the two-dimension code sharing user is a friend relationship.