私はユーザーのメールを持っています.JavaScript APIを使用してFacebookで検索したいと思います。javascript APIを使用してFacebookの検索を実行する
私は何か
FB.api('/search', {q: '[email protected]', type: 'user'}, function(response) {
//Handle response
});
を必要と知っている。しかし、これは動作するようには思えない、私も回答を得ることはありません。
また、何か理由で失敗したFB.login()
への呼び出しの後に、それを入れてみました。
提案がありますか?これを使用する方法に関するドキュメントは非常に曖昧です。
EDIT:
<div id="fb-root"></div>
<script type="text/javascript" >
FB.init({
appId: 'apikey', //Actual API key removed for obvious reasons
status: true, // check login status
cookie: true, // enable cookies to allow the server to access the session
xfbml: true, // parse XFBML
oauth: true // enable OAuth 2.0
});
</script>
<script type="text/javascript" >
FB.login(function (response) {
if (response.authResponse) {
FB.api('/search', {q: '[email protected]', type: 'user'}, function(response) {
{
alert(response);
});
}
else {
alert(response.toString());
}
});
</script>
これはうまくいきましたか? – aleXela
@alexela決してそれを稼働させることはありませんでした。 –