简体   繁体   English

facebook登录我的网站后如何打开特定网页?

[英]How to open specific web page after facebook login to my website?

I integrated facebook login to my website but after doing login it redirects me to https://mywebsite.com instead of https://mywebsite.com/history.php我将 facebook 登录集成到我的网站,但登录后它会将我重定向到https://mywebsite.com而不是https://mywebsite.com/history.php

How can I open https://mywebsite.com/history.php page after login?登录后如何打开https://mywebsite.com/history.php页面? I am using PHP我正在使用 PHP

<html>
    <head>
        <title>This is the login of facebook</title>
    </head>
    <body>

        <script type="text/javascript" src="./fbapp/fb.js"></script>

        <?php 
        if(isset($_SESSION['name']))
        {
        include("history.php");
        }
        else
        {
        ?>
     <div class="fb-login-button" id="btn" data-scope="public_profile,email" onlogin="checkLoginState();">Login</div>
        <?php
        }
        ?>

    </body>
</html>

I added URL but it is still opening https://mywebsite.com below is screenshot我添加了 URL 但它仍然打开https://mywebsite.com下面是截图在此处输入图片说明 Please anyone can help me请任何人都可以帮助我

According to Facebook for Developers you can set your redirect page from the dashboard:根据Facebook for Developers,您可以从仪表板设置重定向页面:

In the App Dashboard, choose your app and go to Products > Facebook Login > Settings.在应用面板中,选择您的应用并转到产品 > Facebook 登录 > 设置。 Under the Client OAuth Settings, enter your redirect URL in the Valid OAuth redirect URIs field for successful authorization.在客户端 OAuth 设置下,在有效 OAuth 重定向 URI 字段中输入您的重定向 URL 以成功授权。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM