How can I search relevant users?


#1

I have the following task:
Authenticate user into the system [done]
When user tries to find his friend using search box (input text), drop down the collection of relevant users.
For example if userA is following to [‘bUser’, ‘bUser2’, ‘bUser3’]
And the twitter has users [‘bonoparte’, ‘bing’, ‘bUser’, ‘bUser2’, ‘bUser3’, etc…]

Then, in case if userA inputs ‘b’ into search box, in drop down should be represented the following collection:
[‘bUser’, ‘bUser2’, ‘bUser3’, ‘bonoparte’, ‘bing’, etc]

Currently when I trigger https://dev.twitter.com/docs/api/1.1/get/users/search, I receive the users registered in twitter even if they are not relevant to userA.
Like so - [‘bonoparte’, ‘bing’, ‘bUser’, ‘bUser2’, ‘bUser3’, etc…]

The question is, is it possible to complete the task as required?