I'm using browscap and switchtheme to display 1 of 2 themes based on browser. I've tested from multiple devices, and all seems to be working - except when I follow a link that was shared to Facebook via mobile.

I used a Facebook like button, which exists in both themes, to post a link from my iPhone. Then, from my laptop, I followed that link. Rather than the default theme that I expected, I saw my mobile theme on the laptop. The URL is exactly the same for mobile and desktop, yet it somehow seems to know that this link was posted from the mobile theme (or a mobile browser), and incorrectly displays the mobile theme on the desktop.

EDIT: Navigating to a different page triggers the theme to adjust correctly.