Community detection in social networks is one of the most active problems. Community detection is useful in lots of real world applications such as finding thematic groups and organizing social events. Most of the existing works on the problem have focused on detecting the community considering only the closeness between community members. In the real world, however, it is also important to consider bad relationships between members. If there are many members who are involved in bad relationships in the community, the community cannot be very friendly, which leads to the fail of the original purpose of the community. In this thesis, we propose a new variant of the community detection problem, called friendly-community search. In the proposed problem, for a given graph, we aim to not only find a densely connected subgraph that contains a given set of query nodes but also minimizes the number of nodes involved in bad relationships in the subgraph. The proposed problem is proved to be NP-hard. To solve the friendly-community search problem, we develop two novel algorithms, called Greedy and SteinerSwap that return the near optimal solutions. The Greedy algorithm removes nodes in a given graph while the SteinerSwap algorithm adds nodes to the Steiner tree built on the query nodes. The Greedy algorithm has an additive error bound. The SteinerSwap algorithm can find a near optimal solution for the proposed problem with a low time complexity. The proposed algorithms are evaluated on real datasets, namely Google+, Epinions, and Twitter. On the average over various experimental parameters for all datasets, SteinerSwap performs 11.1 times better than the comparable method, in terms of the number of nodes involved in bad relationships in the subgraph.