禁用 Facebook 移动浏览器检测?
有谁知道如何通过查询字符串参数禁用 Facebook 的移动浏览器检测和重定向功能?
例如,如果我在移动浏览器中访问 www.facebook.com/CraigslistGenie,我会被重定向到http://m.facebook.com/CraigslistGenie。我希望用户留在该页面的 www 版本上。
Does anyone know of a way to disable the mobile browser detection and redirect feature of Facebook via querystring parameters?
For example, if I go to www.facebook.com/CraigslistGenie in a mobile browser, I get redirected to http://m.facebook.com/CraigslistGenie. I would like the user to stay on the www version of the page.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
您可以更改用户代理来实现此目的,或者将
?m2w
添加到链接,即 http://www.facebook.com/CraigslistGenie/?m2w 不会重定向(在 Android 上测试),而 http://www.facebook.com/CraigslistGenie 确实重定向到 http:// /m.facebook.com/CraigslistGenie参考请参阅此处 和 此处。
you either change the user-agent to achieve that or you add
?m2w
to the link i.e. http://www.facebook.com/CraigslistGenie/?m2w does NOT redirect (tested on Android) while http://www.facebook.com/CraigslistGenie does redirect to http://m.facebook.com/CraigslistGenieFor reference see here and here.
第一个答案是正确的,但是如果您希望它在 Android 手机上运行(并在单击网站内的链接时继续工作),您需要进入浏览器设置(在进入 http://facebook.com?m2w)并检查“桌面版本”设置。
这将防止浏览器不断尝试将您发送到网站的移动版本或 FB 应用程序。
The first answer is correct, however if you want it to work on an Android phone (and keep working when you click on links within the site) you need to go into the browser settings (after you've gone to the http://facebook.com?m2w) and check the "Desktop version" setting.
This will prevent the browser from constantly trying to send you to either the mobile version of the site or the FB app.
Yahia给出的方法很好。在链接中添加 ?m2w 意味着将移动设备视图转换为网页视图。
或者,
更改移动浏览器的设置,即用户代理。不过,Steel 和 Dolphin 浏览器都允许您更改该设置。两者在市场上都是免费的。 (我没有对浏览器进行任何营销。)
你们中的一些人可能已经注意到,尽管更改了浏览器中的用户代理,但您仍然会被发送到移动网站。检查此补丁。
查看这个关于隐藏移动浏览器技巧的大型讨论。
Method given by Yahia is good. Adding ?m2w to link means converting mobile to web view.
Or,
Change settings of mobile browser i.e. User Agent. Both Steel and Dolphin browsers allow you to change that setting however. Both are free in the market. (I am not doing any marketing of browsers.)
Some of you may have noticed that, despite changing the User-Agent in the browser, you are still sent to a mobile website anyway. Check this patches given.
Check this huge discussion about tricks used for hiding mobile browser.