【问题标题】:eBay oauth token flow on small screen i.e. smartphone小屏幕(即智能手机)上的 eBay oauth 令牌流
【发布时间】:2018-11-09 05:45:14
【问题描述】:

几天来,我一直在为智能手机上的 eBay 令牌身份验证而苦苦挣扎。我能够在桌面系统、平板电脑和租用智能手机上注册客户代币。在 android 应用上,有一个意图监听器来获取回复并在应用内注册令牌。

但在某些设备上,通过 ebay 的注册流程中会出现以下消息:

这不能在小屏幕上完成。请使用台式计算机重试。

eBay 客户支持告诉我,无法在应用程序上使用注册。但我不明白这一点,因为令牌注册流程的注册窗口即使在小型设备上也是匹配的!

有解决这个问题的办法吗?最终为网络视图模拟更高分辨率/元信息,这样消息就不会从 eBay 服务器生成?

非常感谢您的任何想法。

【问题讨论】:

    标签: oauth token registration ebay-api


    【解决方案1】:

    我不得不缩小浏览器窗口

    https://stackoverflow.com/a/4322209/1849478

    还需要像这样设置 Webview 的 UserAgent:

    String agent = "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.5) Gecko/20100101 Firefox/4.1";
    mWebView.getSettings().setUserAgentString(agent);
    

    【讨论】:

      【解决方案2】:

      尝试使用 javascript 设置浏览器大小。

      <html>
       <head>
      <script>
        window.alert("Window resolution before overwrite is " + window.screen.availWidth + " x " + window.screen.availHeight);
        Object.defineProperty(window.screen, "availWidth", { get: function(){return 0; }});
        Object.defineProperty(window.screen, "availHeight", { get: function(){return 0; }});
      </script>
      </head>
      <body>
      <script>
        window.alert("Window resolution after overwrite is " + window.screen.availWidth + " x " + window.screen.availHeight);
      </script>
      </body>
      </html>
      

      Here is another way

      【讨论】:

        猜你喜欢
        • 2017-11-20
        • 2017-10-18
        • 1970-01-01
        • 1970-01-01
        • 2019-03-27
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2022-11-20
        相关资源
        最近更新 更多