I have a user email and I would like to find them on Facebook using javascript api.
I know that I need something
FB.api('/search', {q: ' user@email.com ', type: 'user'}, function(response) {
But this does not work, I do not even get an answer.
I also tried putting it inside and / or after calling FB.login() , which for some reason just doesn't work.
Any suggestions? Their documentation on how to use this is so vague.
EDIT:
Here is all the relevant code:
<div id="fb-root"></div> <script type="text/javascript" > FB.init({ appId: 'apikey', </script> <script type="text/javascript" > FB.login(function (response) { if (response.authResponse) { FB.api('/search', {q: ' user@email.com ', type: 'user'}, function(response) { { alert(response); }); } else { alert(response.toString()); } }); </script>
Dan f source share