0

We are using scribe to authenticate on Facebook. The following code snippet gets the url that we call.

Token           requestToken = null;

service = new ServiceBuilder().provider(FacebookApi.class).apiKey(appToken)
                .apiSecret(appSecret)
                .scope("email")
                .callback(callBackUrl)
                .build();
  // send in a null request token for facebook
  authUrl = service.getAuthorizationUrl(requestToken);

This returns the url of this type: https://www.facebook.com/dialog/oauth?client_id=xxx&redirect_uri=yyy&scope=email

This url was successfully posted one time and control returned to the callback uri with a parameter: code. The callback uri got some work done on it and the whole process was repeated. But after the first run, the callback uri is no longer being invoked. Instead, the following error is displayed:

Sorry, your request could not be processed. Please try again

There was no change to the request parameters between the successful and the failed runs. The only change was made to the code running in the callback uri, which should not matter here.

What made it work just once but not again? Is there a way to figure out what the actual problem is? Tried looking at the response printed by the invalid_request.php but do not see any error message. Is there a rule about running the authentication again within certain amount of time? I have not seen anything in the documentation that mentions anything about that.

Has anyone run into this? I have been searching but did not find this specific problem being mentioned.

1 Answers1

0

It seems there is some restriction from Facebook about repeat requests. After waiting several hours and closing and reopening the browser, the callback was invoked successfully.