Alex Rivera | Logout

Facebook Android sdk throwing missing redirect uri on Authetication

Asked 2011-10-11T04:19:37.230
9

I'm using the Facebook android sdk with my android app. Had everything going fine with my app while developing my dev version. When I finally when to publish my app to the public, the facebook authenication spits a ugly error when people try to authenticate my app:

API Error code: 100
API Error description: Invalid parameter
Error Message: Requires valid redirect URI

Seems like facebook thinks I'm doing a browser redirect to them and missing a redirect uri to return to my app, but I am using the android sdk in which you do not send a redirect uri, you have a callback listener:

facebook.authorize(this, new String[] { "email", "publish_stream" }, new FBLoginDialogListener());

Like i said this all worked fine during development and only showed up after released my prod version, so I have checked both the dev app setup and the prod app setup on fb, and they are both identical.

Anyone else see this issue?

UPDATE: It seems I only get this error when a user accepts allowing to log into my app, but then does not accept my permissions. hmmmmm. Maybe I'm not handling some situation, but the error still makes no sense to me.

Edit
Report

2 Answers

8

I solved this issue by disabling the Enhanced Auth Dialog in the Advanced Settings of your app on https://developers.facebook.com/apps

Best regards

answered 2011-10-13T15:02:11.127
1

I have not work that much in Facebook but I thing you misunderstand about Redirect URL. In Facebook class there is a parameter REDIRECT_URI to redirect user if it success It will not redirect you to browser but it is called Facebook sdk provider

See this line

public static final String REDIRECT_URI = "fbconnect://success";

Check for this line in your application.I think there are some content provider in facebook API like fbconnect so that it will call internally that provider may be I am wrong.

Thanks.

answered 2011-10-11T04:42:38.660

Your Answer