0

For a few clients now, I've had a request to hide the "login with Facebook" feature in China, where Facebook is blocked. There are a couple ways I can think of to do this:

1) Use device locale.

  • Advantage: super simple!
  • Disadvantage: Inaccurate— someone in China could have their device set to en_US, and someone in the US could have their phone set to zh_CN. No dice.

2) Use GPS and reverse geocoding.

  • Advantage: You are actually measuring if the person is currently in the territory you've marked as 'restricted'.
  • Disadvantage: Requires the user to give you location permissions. Unclear what to do as a fallback if the user declines permissions. Some apps don't use GPS for anything else, and adding it just for this would be overkill.

3) Use a reachability check to http://facebook.com.

  • Advantage: You're going beyond checking whether the user is in an arbitrary location and actually checking to see whether facebook is currently restricted. If China stops blocking Facebook, your app starts supporting it immediately.
  • Disadvantage: You end up hiding the login UI if you're offline (which might not be a huge problem, because Facebook login won't work offline no matter where in the world you are).
  • Big unknown: What happens in China when you try to log into Facebook? Does it return a 404? Redirect to another site? Google searches around this (as linked above) just return things along the lines of "how to get around the Great Firewall" rather than "here's what actually happens when it's blocked".

So, the question: What happens when you try to log into Facebook from behind China's great firewall?

buildsucceeded
  • 4,203
  • 4
  • 34
  • 72
  • I think people in such locations with restricted access are aware already – so why go through the trouble of trying to hide the FB login button from them? Especially since it might do more harm than good, if you hide it from people erroneously, that would be perfectly able to use FB login. – CBroe Jun 23 '16 at 09:31
  • @CBroe that is a question for product :) They have decided to hide it, so engineering needs to hide it in the best possible way… – buildsucceeded Jun 23 '16 at 09:32
  • And if in scenario 3 you’re happy with your app automatically supporting FB login if it stops being blocked, then I don’t see why the possibility of a user “faking” their location (point 1) would be problematic either - they won’t be able to _use_ it because it is blocked, so what if they only “cheat themselves” in that regard? – CBroe Jun 23 '16 at 09:33
  • I’d tell “product” that there is no _good_ possible way. Plus they are trying to fix a problem that doesn’t need fixing. – CBroe Jun 23 '16 at 09:35
  • Point 1 isn't about faking, it's about people who just happen to be using a different locale setting than the one we think of as being associated with a territory. – buildsucceeded Jun 23 '16 at 09:39
  • As for "no good way" — I certainly respect that position, but the number of places I've seen this done makes me feel like this is a legitimate question as it stands, even if it's a UX decision some might disagree with. – buildsucceeded Jun 23 '16 at 09:40

1 Answers1

1
  • Trying to access Facebook in mainland China would result in error, like 403 Forbidden or 404 Not Found.
  • GPS Might not be a good idea, because the GPS signal in China is drifted, and as a result many cities located on the boundary would get overlapped GPS position, including southern Shenzhen/northern Hong Kong, Zhuhai/Macau, NE China/Russia and such.
  • How about reading the Mobile Country Code? So that users who are using Chinese sim card in their iphone can be identified and the option for facebook login can be disabled. But this trick would not be useful on iPod/iPad. It would also affect Chinese users roaming outside their country. How about checking if the IP address belong to a Chinese ISP?
user930067
  • 276
  • 3
  • 10