Facebook apprequests dialog failed. "An error has occurred. Please try again later."

I searched for all possible topics, but now the solution works for me.

There is my code that works in all browsers except Chrome. There is only a window with An error occurred. Please try again later. An error occurred. Please try again later. .

This is identical code from the FB documentation.

 <div id="fb-root"></div> <script src="http://connect.facebook.net/en_US/all.js"></script> <script> FB.init({ appId : {$appId}, frictionlessRequests: true }); function sendRequestViaMultiFriendSelector() { FB.ui({ method: 'apprequests', message: '{_"FACEBOOK_INVITE_WINDOW_MESSAGE"}' }, requestCallback); } function requestCallback(response) { //callback code } </script> <a onclick="sendRequestViaMultiFriendSelector(); return false;"> 
+4
source share
3 answers

Perhaps this is due to the fact that your application is still in sandbox mode.

+2
source

You must specify a display option for the dialog ("popup", "iframe" ...)

For instance:

 FB.init({ appId : {$appId}, frictionlessRequests: true, display: 'popup' }); 
+1
source

You did not indicate whether your application is on Facebook or not. The reason for this is important due to the canvas_url parameter of your application parameters. If you on apps.facebook.com/app_namespace , then you will already have this field filled in. However, some projects simply do not work on Facebook itself. In such cases, people really do not need to fill out this parameter. However, it is essential that application requests work.

When a user acts upon request of an application (IE accepts it), they are redirected to the URL of this application. Without specifying a canvas URL, it can invalidate the request. It can also be the cause of the error.

Try setting the canvas url. You can even redirect it to your own URL, it should not "do" anything else.

0
source

All Articles