当用户成功登录facebook时,javascript中有一个响应对象。如何使用 post 或其他方法将此对象传递给 PHP?
window.fbAsyncInit = function() {
FB.init({
appId: '12345788', // App ID
channelUrl: /channel.html', // Channel File
status: true, // check login status
cookie: true, // enable cookies to allow the server to access the session
xfbml: true // parse XFBML
});
// Additional init code here
FB.getLoginStatus(function(response) {
if (response.status === 'connected') {
// connected
var uid = response.authResponse.userID;
var accessToken = response.authResponse.accessToken;
} else if (response.status === 'not_authorized') {
// not_authorized
} else {
// not_logged_in
}
});