使用google +登录后指定要定向的页面

时间:2014-09-27 16:37:39

标签: google-plus google-api-php-client

例如,指定在signincallback()方法上将用户(登录后)指向“login.php”的代码是什么?

    function signinCallback(authResult)
{
    if (authResult['status']['signed_in']) 
        {---------------what to put here------------------} 

    else {console.log('Sign-in state: ' + authResult['error']);
        }
}

1 个答案:

答案 0 :(得分:0)

确保他们已登录(类似 cookie )然后调用:

document.location.assign("https://www.example.com/profile/profile_open_page.php");