网站未在移动设备上通过Google+加载

时间:2021-01-12 15:23:15

I'm developing a website with a share option. The website is loaded fine through a share link from Facebook and Twitter but not Google+ (On mobile).

我正在开发一个带有共享选项的网站。该网站通过Facebook和Twitter的共享链接正常加载,但不是Google+(在移动设备上)。

I do see that the website is opened but not loaded completely. Is there a way to debug this? I already tried google's debug link https://developers.google.com/structured-data/testing-tool/ but it didn't help me.

我确实看到网站已打开但未完全加载。有没有办法调试这个?我已经尝试了谷歌的调试链接https://developers.google.com/structured-data/testing-tool/,但它没有帮助我。

EDIT:

What I mean is that after you publish, go to google+ and click the published content. It should open the website. In my case it opens it but then the page is not loaded completely.

我的意思是,在您发布后,转到谷歌+并单击已发布的内容。它应该打开网站。在我的情况下,它打开它,但然后页面没有完全加载。

UPDATE:

I debugged google plus chrome from my desktop and here is what I found:

我在桌面上调试了google plus chrome,这是我发现的:

There is an exception when trying to initialize auth2:

尝试初始化auth2时有一个例外:

Uncaught TypeError: _.RE is not a function
pZ                                              @ cb=gapi.loaded_1:formatted:1705
jF                                              @ cb=gapi.loaded_1:formatted:1481
_.hN                                            @ cb=gapi.loaded_1:formatted:1770
(anonymous function)                            @ google.js:200
(anonymous function)                            @ client:plusone.js?_=1463374618220:10
Ea                                              @ client:plusone.js?_=1463374618220:4
b                                               @ client:plusone.js?_=1463374618220:10
F.(anonymous function).F.(anonymous function)   @ client:plusone.js?_=1463374618220:10
c                                               @ client:plusone.js?_=1463374618220:10
(anonymous function)                            @ client:plusone.js?_=1463374618220:10
Ea                                              @ client:plusone.js?_=1463374618220:4
b                                               @ client:plusone.js?_=1463374618220:10
F.(anonymous function).F.(anonymous function)   @ client:plusone.js?_=1463374618220:10
c                                               @ client:plusone.js?_=1463374618220:10
(anonymous function)                            @ client:plusone.js?_=1463374618220:10
Ea                                              @ client:plusone.js?_=1463374618220:4
b                                               @ client:plusone.js?_=1463374618220:10
F.(anonymous function)                          @ client:plusone.js?_=1463374618220:10
C.(anonymous function)                          @ client:plusone.js?_=1463374618220:10
(anonymous function)                            @ cb=gapi.loaded_0:1

Here is my code for initializing gapi and auth:

这是我初始化gapi和auth的代码:

if (!window.gapi) {
        $.getScript('//apis.google.com/js/platform.js', function () {
            $.getScript('//apis.google.com/js/client:plusone.js', function () {
                gapi.load('auth2', function(){
                    gapi.auth2.init({
                        client_id: 'my-client-id',
                        cookiepolicy: 'single_host_origin',
                        scope: 'profile email https://www.googleapis.com/auth/plus.circles.read'
                      }).then(function(){
                          auth2 = arguments[0];
                        authPromise.resolve();
                      },
                      function(){
                        authPromise.reject();
                      });
                });

                gapi.load('client', function() { 
                    gapi.client.load('plus', 'v1').then(function() {
                        clientPromise.resolve();
                    }, function(){
                        clientPromise.reject();
                    });
                }, function(){
                    clientPromise.reject();
                });

            });
        });

1 个解决方案

#1


0  

It's working perfectly on my mobile and desktop. Check the screenshot below taken from my mobile.

它在我的手机和桌面上完美运行。查看我手机上的截图。

网站未在移动设备上通过Google+加载

#1


0  

It's working perfectly on my mobile and desktop. Check the screenshot below taken from my mobile.

它在我的手机和桌面上完美运行。查看我手机上的截图。

网站未在移动设备上通过Google+加载