Facebook friend dialogue does not work on mobile devices

Prologue:

I have about the same problem as described in a previously asked question ( FB add friend dialog doesnโ€™t work on mobile ).

But since the real solution to this problem was not known otherwise than the comment:

"he began to work ... I did not change anything." [...] ( @dinodsaurus )

I ask again. With some additional information specific to my case.

I use the facebook friends dialog, redirecting (302) to a URL, for example: ( https://www.facebook.com/dialog/friends/?id=3500194&app_id=531355753613866&redirect_uri=http%3A%2F%2Fstackoverflow.com%2Fquestions % 2F19403197% 2Ffacebook-friend-dialog-not-working-on-mobile% 23success )

The above URL works fine both on the desktop and on the mobile browser.

Facebook will automatically redirect the above URL to its domain m.facebook.comwhen using a mobile device / browser. This displays the version of the dialog display=touch( see Link to dialog ).

All this seems very normal (and actually is the desired behavior).

But ... this happens wrong when I confirm that I want to send a friend request. And only when I confirm it using a mobile device .

The message I receive after confirmation on my mobile device is:

"Sorry, something went wrong.

We are working to fix this as soon as possible.

(, m.facebook.com, , .)

, , ( , , it ) Facebook, , . , . ...

:

, : - - , Facebook , , ? , , ?

...;)

:

Repro . , , Repro : https://developers.facebook.com/bugs/309157325894924, .

+4
2

Facebook , " " 7 2013 .

https://developers.facebook.com/x/bugs/309157325894924/. . .

, , , , . , . , -, .

PS: bugreport, .

PS2: ", ", , . - facebook , " facebook" - . , .

0

Wimagguc , : -

, API Facebook , .

protected static String DIALOG_BASE_URL = "https://m.facebook.com/dialog/";
protected static String DIALOG_BASE_URL_FOR_MISSING_SCREENS = "https://www.facebook.com/dialog/";

public void dialog(Context context, String action, Bundle parameters,
        final DialogListener listener) {

    boolean missingScreen = action.contentEquals("friends") ? true : false;

    String endpoint = missingScreen ? DIALOG_BASE_URL_FOR_MISSING_SCREENS : DIALOG_BASE_URL;
    endpoint += action;

    parameters.putString("display", missingScreen ? "popup" : "touch");
    parameters.putString("redirect_uri", REDIRECT_URI);

    if (action.equals(LOGIN)) {
        parameters.putString("type", "user_agent");
        parameters.putString("client_id", mAppId);
    } else {
        parameters.putString("app_id", mAppId);
    }

    if (isSessionValid()) {
        parameters.putString(TOKEN, getAccessToken());
    }
    String url = endpoint + "?" + Util.encodeUrl(parameters);
    if (context.checkCallingOrSelfPermission(Manifest.permission.INTERNET)
            != PackageManager.PERMISSION_GRANTED) {
        Util.showAlert(context, "Error",
                "Application requires permission to access the Internet");
    } else {
        new FbDialog(context, url, listener).show();
    }
}
0

All Articles