简体   繁体   中英

iPhone Twitter App Link Sharing - Not going to mobile site

On my site, users have the ability to link to photos they uploaded. If the browser is detected as mobile, they are routed to the correct mobile friendly page. If the browser is not, they are directed to a regular browser page. When I share links on twitter, the iphone twitter app shows the correct link but sometimes opens the non mobile site. If I "open in safari" from the iphone twitter app, safari show the correct mobile page. If I then go back into twitter on the iphone, and re select the link, it shows the correct mobile page within the twitter browser. Does anybody know why this is? Clearly it is dependent on what safari does, but how can I make the first "click" show the right page?

Blame this one on poor coding. The technique I was using for parsing the http headers had a typo in it for detecting mobile browsers. I have a two rules that get checked. Safari was falling under the second rule and must have cached the site, which I believe is why the twitter browser worked after that. All has been corrected and tested.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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