A nearby friend discovery method comprising: displaying, by an electronic device, a friend list representing phonebook entries together with an icon indicating a nearby friend discovery function; receiving, by the electronic device, an input selecting the nearby friend discovery icon; generating, by the electronic device, in response to the received input, an access point, AP, list identifying one or more APs, the AP list being generated based on the strength of signals received from the access points; transmitting the AP list from the electronic device along with a nearby friend discovery request, to a server; receiving, by the electronic device from the server, a nearby friend list including an indication of one or more users who are located within a signal range of at least one of the APs identified in the AP list, and who are determined by the server to be friends of the user of the electronic device based on information provided by a friend relationship database; displaying, by the electronic device, the nearby friend list in the form of phonebook entries; receiving, by the electronic device, an input selecting at least one phonebook entry in the nearby friend list, and in response inquiring, by the electronic device, which of a choice of communication networks including an AP existing in the AP list and a cellular communication service is to be used; receiving, by the electronic device, an input selecting one of the communication networks; and transmitting (S1615, S1608), by the electronic device, data to an external electronic device corresponding to the selected phonebook entry in the nearby friend list based on the selected communication network. displaying, by an electronic device, a friend list representing phonebook entries together with an icon indicating a nearby friend discovery function; receiving, by the electronic device, an input selecting the nearby friend discovery icon; generating, by the electronic device, in response to the received input, an access point, AP, list identifying one or more APs, the AP list being generated based on the strength of signals received from the access points; transmitting the AP list from the electronic device along with a nearby friend discovery request, to a server; receiving, by the electronic device from the server, a nearby friend list including an indication of one or more users who are located within a signal range of at least one of the APs identified in the AP list, and who are determined by the server to be friends of the user of the electronic device based on information provided by a friend relationship database; displaying, by the electronic device, the nearby friend list in the form of phonebook entries; receiving, by the electronic device, an input selecting at least one phonebook entry in the nearby friend list, and in response inquiring, by the electronic device, which of a choice of communication networks including an AP existing in the AP list and a cellular communication service is to be used; receiving, by the electronic device, an input selecting one of the communication networks; and transmitting (S1615, S1608), by the electronic device, data to an external electronic device corresponding to the selected phonebook entry in the nearby friend list based on the selected communication network.