現在、ユーザーの facebook と google アカウントがこれらのサイトからデータを取得する権限を持つ Web アプリに取り組んでいます。私が使用した:
FB.getLoginStatus(function(response) {
if (response.status === 'connected') {
user_id = response.authResponse.userID;
accessToken = response.authResponse.accessToken;
}
else if (response.status === 'not_authorized') {
// the user is logged in to Facebook,
// but has not authenticated your app
}
else {
// the user isn't logged in to Facebook.
}
});
oauth トークンを取得します。
今では、ユーザーが自分の Facebook または Google アカウントにログインするたびに必要です。このユーザーがログインしたことを Web アプリケーションで通知します。