6
votes

Does anyone know how to modify fbauth:// parameters to effect a redirect back to mobile Safari?

Details:

We have a mobile optimized site with Facebook integration. When using Facebook's client side authentication the user is redirected to m.facebook.com for the Facebook app to request permissions. We would prefer that the native iOS Facebook app be opened instead and after the user grants permission in the Facebook app, be redirected back to mobile Safari.

To get the first half of this working we peeked inside the Facebook iOS SDK and found this URL scheme to trigger the native iOS app for app authorization:

fbauth://authorize?redirect_uri=http%3A%2F%2Fwww.ourcompany.com%2F&client_id=126187084187632&response_type=token

However once our Facebook app has been granted access by the user the redirect never happens.

Is there a known way to tweak the request parameters to cause the redirect to happen?

If not is there a parameter that can be set so that the user is directed to the apps tab page or canvas page after authorizing the app?

1
What happens when the Facebook app is not installed? Would the fbauth:// link fail?Gabriel R.
@Todd Chapman have you find a solution?Luigi Saggese

1 Answers

1
votes

It's not possible; I think this is because Facebook's native app can't send the user back after login to the same safari tab that the request originated in, it might not work with the auth flow in other ways too, i'm not sure

Regardless, it's not possible to go Safari webapp -> Facebook native app -> Safari Webapp

If your app is also native and the iOS details are present you can go safari webapp -> facebook native app -> your native app / app store though