这是iOS for iOS WebView用户代理吗? [英] Is this a Facebook for iOS WebView User Agent?

查看:166
本文介绍了这是iOS for iOS WebView用户代理吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在查看一些日志,试图解释一些有趣的行为,我看到一些用户使用与此类似的用户代理来到我的应用程序:

  Mozilla / 5.0(iPad; U; CPU iPhone OS 5_1_1,如Mac OS X; en_US)AppleWebKit(KHTML,如Gecko)Mobile [FBAN / FBForIPhone; FBAV / 4.1.1; FBBV / 4110.0; FBDV / iPad2,1; FBMD / iPad; FBSN / iPhone OS; FBSV / 5.1.1; FBSS / 1; FBCR /; FBID /平板电脑; FBLC / en_US; FBSF / 1.0] 

如果我通过此字符串运行的答案中显示的身份证明

  @i386在模拟器上
@iPod1,1在iPod Touch
@iPod2,1上iPod Touch第二代iPod touch第二代
@ iPod3,1iPod3,1在iPod Touch第四代
@ iPod4,1在iPod Touch第四代
@iPhone1,1在iPhone
iPhone 3G上的iPhone1,2iPhone 3G上的iPhone2,1,iPad上的iPhone2,1,iPad上的iPad1,1,iPad上的iPad2,1,2美元,iPad 2上的iPad2,1。$ b $ iPad 3上的@ iPad3,1(又称新iPad)iPhone 4上的bb3,iPhone 4上的iPhone3,1,iPhone 4上的iPhone4,1,iPhone 4的iPhone4,1,iPhone5,1 在iPhone 5上
@iPhone5,2在iPhone 5上

这表示您在上显示它是facebook应用程序的字符串iPad 2


I'm looking through some logs trying to explain some "interesting" behavior and I'm seeing some users come to my application with a user agent similar to this one:

Mozilla/5.0 (iPad; U; CPU iPhone OS 5_1_1 like Mac OS X; en_US) AppleWebKit (KHTML, like Gecko) Mobile [FBAN/FBForIPhone;FBAV/4.1.1;FBBV/4110.0;FBDV/iPad2,1;FBMD/iPad;FBSN/iPhone OS;FBSV/5.1.1;FBSS/1; FBCR/;FBID/tablet;FBLC/en_US;FBSF/1.0]

If I run this string through udger.com I get the following result:

This screen shot and user agent confuses me because it says it's the mobile safari for iPod and iPad. I see iPad in the first part of the user-agent, but I also see a lot of references to FB and iPhone and iOS and all kinds of other things.

I'm curious if this is a "generic" user-agent that is served up by the Facebook for iOS application, and if it is - is the device an iPad or is it just not clear enough to tell?

解决方案

Yes it is the iOS Facebook app....

The following is the user agent string from an iPhone 4s showing that it includes the correct device iPhone4,1

Mozilla/5.0 (iPhone; CPU iPhone OS 6_0_1 like Mac OS X)
AppleWebKit/536.26 (KHTML, like Gecko) Mobile/10A523
[FBAN/FBIOS;FBAV/5.3;FBBV/89182;FBDV/iPhone4,1;FBMD/iPhone;FBSN/iPhoneOS;
FBSV/6.0.1;FBSS/2; FBCR/O2;FBID/phone;FBLC/en_US]

The devices shown seem to follow the same model identification shown in an answer on detecting iOS models

@"i386"      on the simulator
@"iPod1,1"   on iPod Touch
@"iPod2,1"   on iPod Touch Second Generation
@"iPod3,1"   on iPod Touch Third Generation
@"iPod4,1"   on iPod Touch Fourth Generation
@"iPhone1,1" on iPhone
@"iPhone1,2" on iPhone 3G
@"iPhone2,1" on iPhone 3GS
@"iPad1,1"   on iPad
@"iPad2,1"   on iPad 2
@"iPad3,1"   on iPad 3 (aka new iPad)
@"iPhone3,1" on iPhone 4
@"iPhone4,1" on iPhone 4S
@"iPhone5,1" on iPhone 5
@"iPhone5,2" on iPhone 5

This means the string you show that it was an the facebook app on iPad 2

这篇关于这是iOS for iOS WebView用户代理吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆