Facebook 仍然通过 https 加载 http 内容

发布于 2024-12-29 10:49:56 字数 3169 浏览 0 评论 0原文

首先,我知道人们总是会问类似的问题。我尝试了这些问题的所有解决方案,但没有结果,而我的页面非常简单。该页面允许用户通过以下 html 页面向他的留言墙上发布消息:

<head profile="https://gmpg.org/xfn/11">

    <title>Bacchi Facebook Campagne</title>

    <meta content="text/html; charset=UTF-8" http-equiv="Content-Type" />
    <meta content="Media-Enzo.nl / Niels van Renselaar" name="author" />

    <meta content="" name="keywords" />             
    <meta content="" name="description" />

    <link rel="stylesheet" type="text/css" href="/reset.css" media="screen" />
    <link rel="stylesheet" type="text/css" href="/style.css" media="screen" />


    <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.5.2/jquery.min.js"></script>
    <script type="text/javascript" src="/javascripts/default.js"></script>


</head>

<body>

    <div id="fb-root"></div>

    <script type="text/javascript">
    (function(d){
       var js, id = 'facebook-jssdk'; if (d.getElementById(id)) {return;}
       js = d.createElement('script'); js.id = id; js.async = true;
       js.src = "//connect.facebook.net/en_US/all.js";
       d.getElementsByTagName('head')[0].appendChild(js);
     }(document));


    window.fbAsyncInit = function() {
        FB.Canvas.setSize();
        FB.init({
            appId : '252817401440179',
            status : true, // check login status
            cookie : true, // enable cookies to allow the server to access the session
            xfbml : true, // parse XFBML
            oauth : true
        });

    }

    function share_now() {

            FB.ui(
              {
                method: 'feed',
                name: 'Bacchi Like & Win',
                link: 'https://www.facebook.com/pages/Bacchi/312242852138511?sk=app_252817401440179',
                picture: 'https://fbcdn-profile-a.akamaihd.net/hprofile-ak-ash2/373503_312242852138511_832874149_n.jpg',
                caption: 'Bacchi',
                message: 'Ik doe mee aan de Bacchi actie!',
                description: 'Bacchi is een merk om mee gezien te worden en om stil van te genieten. Bacchi is voor alle leeftijden, van jong tot oud. Bacchi is dat persoonlijke moment waarin je ontsnapt aan de dagelijkse beslommeringen. Het helpt je bij het besef dat het belangrijk is om van het leven te genieten'
              },
              function(response) {
                if (response && response.post_id) {
                  alert('Bedankt voor het delen!');
                } else {
                  alert('Jammer dat je onze pagina niet hebt gedeeld, maar je maakt nog steeds kans op het gekozen pakket!');
                }
              }
            );

    }
    </script>

    <div id="thanks" onclick="share_now();">

    </div>

</body>

问题; Facebook 仍然加载

http://static.ak.facebook.com/connect/canvas_proxy.php?version=3#behavior=p&method=setSize&params={%22height%22%3A576%2C%22width% 22%3A1451%2C%22frame%22%3A%22iframe_canvas%22}

通过 HTTP 而不是HTTPS。有人有什么想法吗?

First, I know simular questions get asked all the time. I tried all the solutions on those questions with no results, while my page is very simple. The page allows a user to post a message to his wall, with this html page:

<head profile="https://gmpg.org/xfn/11">

    <title>Bacchi Facebook Campagne</title>

    <meta content="text/html; charset=UTF-8" http-equiv="Content-Type" />
    <meta content="Media-Enzo.nl / Niels van Renselaar" name="author" />

    <meta content="" name="keywords" />             
    <meta content="" name="description" />

    <link rel="stylesheet" type="text/css" href="/reset.css" media="screen" />
    <link rel="stylesheet" type="text/css" href="/style.css" media="screen" />


    <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.5.2/jquery.min.js"></script>
    <script type="text/javascript" src="/javascripts/default.js"></script>


</head>

<body>

    <div id="fb-root"></div>

    <script type="text/javascript">
    (function(d){
       var js, id = 'facebook-jssdk'; if (d.getElementById(id)) {return;}
       js = d.createElement('script'); js.id = id; js.async = true;
       js.src = "//connect.facebook.net/en_US/all.js";
       d.getElementsByTagName('head')[0].appendChild(js);
     }(document));


    window.fbAsyncInit = function() {
        FB.Canvas.setSize();
        FB.init({
            appId : '252817401440179',
            status : true, // check login status
            cookie : true, // enable cookies to allow the server to access the session
            xfbml : true, // parse XFBML
            oauth : true
        });

    }

    function share_now() {

            FB.ui(
              {
                method: 'feed',
                name: 'Bacchi Like & Win',
                link: 'https://www.facebook.com/pages/Bacchi/312242852138511?sk=app_252817401440179',
                picture: 'https://fbcdn-profile-a.akamaihd.net/hprofile-ak-ash2/373503_312242852138511_832874149_n.jpg',
                caption: 'Bacchi',
                message: 'Ik doe mee aan de Bacchi actie!',
                description: 'Bacchi is een merk om mee gezien te worden en om stil van te genieten. Bacchi is voor alle leeftijden, van jong tot oud. Bacchi is dat persoonlijke moment waarin je ontsnapt aan de dagelijkse beslommeringen. Het helpt je bij het besef dat het belangrijk is om van het leven te genieten'
              },
              function(response) {
                if (response && response.post_id) {
                  alert('Bedankt voor het delen!');
                } else {
                  alert('Jammer dat je onze pagina niet hebt gedeeld, maar je maakt nog steeds kans op het gekozen pakket!');
                }
              }
            );

    }
    </script>

    <div id="thanks" onclick="share_now();">

    </div>

</body>

Problem; Facebook still loads

http://static.ak.facebook.com/connect/canvas_proxy.php?version=3#behavior=p&method=setSize¶ms={%22height%22%3A576%2C%22width%22%3A1451%2C%22frame%22%3A%22iframe_canvas%22}

over HTTP and not HTTPS. Anyone has any idea?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

指尖微凉心微凉 2025-01-05 10:49:56

您是否看过这个问题:带有附加参数的 FQL 的 Facebook JavaScript SDK< /a>

对于通过 https 返回的任何内容,您必须在每个 API 调用中使用 return_secure_resources

另请查看此处:Facebook JavaScript SDK 通过 HTTPS 加载非安全项目

Have you looked at this question: Facebook JavaScript SDK for FQL with additional parameter

For anything to be returned over https you have to use return_secure_resources in each API call

Also take a look here: Facebook JavaScript SDK over HTTPS loading non-secure items

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文