Question

I am developing Facebook integration on an Android app using the Android Facebook SDK.

I am logging my users in using the Session.openActiveSession(this, true, facebookSessionChangeCb); call as described in Facebook's Android documentation.

Most works brilliantly. But there is one problem that repros like this:

1) I install the native Facebook app on my Android device, and log in on the Native app.

2) I also navigate on an internet browser to settings and turn the platform to off, as shown in the screenshot below.

3) I then try to log in on my native Android app with Facebook integration using the Android Facebook SDK.

I then get the stack trace

02-13 15:27:54.687: W/fb4a(:<default>):BlueServiceQueue(16890): Exception during service
02-13 15:27:54.687: W/fb4a(:<default>):BlueServiceQueue(16890):         com.facebook.http.protocol.ApiException: Service temporarily unavailable
02-13 15:27:54.687: W/fb4a(:<default>):BlueServiceQueue(16890): at     com.facebook.http.protocol.ApiResponseChecker.b(ApiResponseChecker.java:83)
02-13 15:27:54.687: W/fb4a(:<default>):BlueServiceQueue(16890): at com.facebook.http.protocol.ApiResponseChecker.a(ApiResponseChecker.java:162)
02-13 15:27:54.687: W/fb4a(:<default>):BlueServiceQueue(16890): at com.facebook.http.protocol.ApiResponse.g(ApiResponse.java:158)
02-13 15:27:54.687: W/fb4a(:<default>):BlueServiceQueue(16890): at com.facebook.platform.auth.server.AuthorizeAppMethod.a(AuthorizeAppMethod.java:274)
 ...
02-12 18:36:42.928: W/fb4a(:<default>):GDPDialog(5750): Failed to send 
02-12 18:36:42.928: W/fb4a(:<default>):GDPDialog(5750): com.facebook.fbservice.service.ServiceException: API_ERROR: API_ERROR 
02-12 18:36:42.928: W/fb4a(:<default>):GDPDialog(5750): at com.facebook.fbservice.ops.BlueServiceOperation.c(BlueServiceOperation.java:640) 

This exception claims to be a temporarily unavailable type exception, but it clearly isn't as it stays that way indefinitely.

This is a problem: I don't want to treat it as if it were a 503, because it will always fail, and I'll end up messaging the user with a horrid error message, or worse a "try again later", as the exception would suggest, which is simply misleading to the user.

The question is: have I done something wrong? Am I being dim in some way? If not, is there a workaround? Has anybody had this issue before? I couldn't find this stack on SO. If this is normal, how do people message the users here? And importantly, can we distinguish this case from genuine temporary service downs, so I can tell my users what's wrong?

Thanks very much in advance!


(That screenshot below so you know what I'm referring to)

That screenshot

Was it helpful?

Solution

One month on now, seems like this is indeed unavoidable!

Being able to turn the "platform" off in the browser is part of privacy offering of Facebook. It's often cited as a way to be able to hide from app invitations etc.

My best guess is that it makes sense to give a status code that isn't indicative of what the user has done as a light security measure to hide the user away further from apps.

A good solution is to add a section about the Facebook platform settings to your documentation if you have it.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top