Not sure what you mean by your immediate circle in terms of Facebook, but I assume you mean your friends. The Graph API allows you to search for all public objects ( source ) - this means that everyone is (according to the answers to this page , since the names are always public - this is my understanding), and not just those with whom you are friends on Facebook.
Therefore, when you search for โJohn,โ you must get everyone to call John, if you use the Graph API correctly, make sure your access token is valid (you do not need special permissions to search for people) and your syntax follows the example here .
To test your request, I suggest you use the Graph API Explorer before adding the request to the application code. This is a quick way to check if an error is in your request or elsewhere. For example, if you want to find everyone named John, use this link http://developers.facebook.com/tools/explorer?method=GET&path=search%3Fq%3DJohn%26type%3Duser . Just be sure to click on the โGet access tokenโ button on the right if you are using Explorer for the first time, otherwise the request will return an error.
source share