나는 phonegap facebook plugin과 facebook javascript api를 사용하고 있습니다. 여기에 내 코드facebook에서 userID를 얻을 수 없습니다. javascript login api
FB.init({
appId: "xxxxxxxxxxxxxxx",
status: true,
oauth :true,
nativeInterface: CDV.FB,
//channelURL : 'www', // Channel File
cookie: true,
//useCachedDialogs: false,
xfbml: true
});
FB.login(function(response) {
if (response.authResponse) {
alert(response.authResponse.userID); // literally shows three dots
FB.api('/me', function(me){
if (me.id) {
alert(me.id); // this works
}
});
}
}, { scope: "email" });
내가 authResponse에서 accessToken을 얻을 수 있습니다 .... 그 긴 문자열입니다. 그러나 userID 필드는 말 그대로 "..."입니다. /me
을 가져 오기 위해 다른 그래프 API 호출을 사용하여 서버로 추가 왕복을하면서 사용자 ID를 얻을 수 있지만 낭비입니다.
나는 똑같은 것을보고있다. oauth 토큰은 콜백에서 유효하지만 userID 필드는 문자 그대로 "..."입니다. – Leopd
은 "response.authResponse.userID"문으로 사용자 ID를 가져 오지 못하고 있습니까? – MSUH
질문이 명확하지 않고 동일한 문제가 있다고 생각하므로 정확한 문제에 대한 질문을 명확히 할 것입니다. – Leopd