iPad 中的 Facebook:UIWebView - 呈现为触摸而不是标准网页

发布于 2024-09-12 10:01:00 字数 612 浏览 4 评论 0原文

直到几天前,它还运行良好:在 iPad/UIWebView 中打开 facebook.com,呈现为标准网页。现在 Facebook 被强制渲染为触摸 - 就像 URL 为 http://touch.facebook.com 一样。无论 UIWebView 框架大小如何,都会发生这种情况。这是主视图控制器查看问题的简单代码:

UIWebView *wv = [[UIWebView alloc] initWithFrame:self.view.frame];
NSURLRequest *req = [NSURLRequest requestWithURL:[NSURL  URLWithString:@"http://www.facebook.com"]];
[wv loadRequest: req];
[self.view addSubview: wv];

我尝试按照建议更改用户代理 这里 - 不好。

Up until a few days ago it worked fine: opening facebook.com in iPad/UIWebView rendered as standard web. Now Facebook is force-rendered as touch - as if the URL was http://touch.facebook.com. This happens regardless of the UIWebView frame size. Here is a simple code for the main view controller to see the problem:

UIWebView *wv = [[UIWebView alloc] initWithFrame:self.view.frame];
NSURLRequest *req = [NSURLRequest requestWithURL:[NSURL  URLWithString:@"http://www.facebook.com"]];
[wv loadRequest: req];
[self.view addSubview: wv];

I tried changing the user agent as suggested here - no good.

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

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

发布评论

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

评论(1

琉璃繁缕 2024-09-19 10:01:00

使用 http://www.facebook.com?m2w 应该可以解决此问题。 “m2w”听起来像是“mobile 2 web”的缩写,它是您在移动网站上单击“完整网站”时到达的链接。

Using http://www.facebook.com?m2w should resolve this. "m2w" sounds like it is short for "mobile 2 web", and it's the link that you arrive at when you click "full site" from the mobile site.

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