简体   繁体   English

Facebook AppRequests +浏览器兼容性

[英]Facebook AppRequests + Browser Compatibility

I have a web based application that requires the functionality to "share the application" to the logged-in user's friends. 我有一个基于Web的应用程序,需要将功能“共享应用程序”给登录用户的朋友。

I generate a URL for this (see below) and it works, as it should, in: 我为此生成了一个URL(请参见下文),并且它应该在以下位置起作用:

  • Desktop Browsers 桌面浏览器
  • Android Chrome Browser Android Chrome浏览器
  • Android Firefox displays a blank screen while The "Internet" Browser (default shipped browser with most Android devices <4.4) shows: Android Firefox显示黑屏,而“ Internet”浏览器(大多数<4.4的Android设备附带的默认浏览器)显示:


    " Server Error 服务器错误
    The website encountered an error while retrieving [URL]. 该网站在检索[URL]时出错。 It may be down for maintenance or configured incorrectly. 可能由于维护原因而停机或配置不正确。


    The URL generated (after www -> m redirecting) is : 生成的URL(在www-> m重定向之后)为:

    https://m.facebook.com/dialog/apprequests?app_id=[APP_ID]&message=[MESSAGE]&redirect_url=[CALLBACK URL] https://m.facebook.com/dialog/apprequests?app_id= [ APP_ID] &message = [ MESSAGE] &redirect_url = [回叫网址]

    Another observation is that if I force the mobile browsers to render as a desktop web page, and replace m with www, it works fine... 另一个观察结果是,如果我强制移动浏览器呈现为桌面网页,并将m替换为www,则可以正常工作...

    I am using Java Servlettes(with RestFB ), jQuery (Base+Mobile) + HTML 我正在使用Java Servlettes(with RestFB ),jQuery(Base + Mobile)+ HTML

    Would anyone know what I am missing for the other browsers? 谁知道其他浏览器缺少的内容吗? It seems odd that it works in some and not in others. 它在某些情况下而不在其他情况下起作用似乎很奇怪。

    For anyone's reference, it seems, like at this point in time, that I was trying to achieve something unrealisble with the Facebook API. 供大家参考,就像在这个时间点上,我正在尝试使用Facebook API实现一些不言而喻的事情。 I have since changed to the JavaScript SDK for Facebook, and the problem has disappeared. 此后,我已更改为Facebook的JavaScript SDK,该问题已消失。

    Smacking my head why I initially thought using the SDK would be overkill - so much easier to use! 为什么我最初认为使用SDK会过头,这使我目结舌-如此容易使用!

    尝试使用www而不是m并在url &display=touch的末尾添加。

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

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