iPad 中的 Facebook:UIWebView - 呈现为触摸而不是标准网页
直到几天前,它还运行良好:在 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
使用 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.