Error trying to share facebook link with Android

some time ago I found a way to share my facebook application using this:

How to send facebook link from Android app using FB API?

for some reason I get this error:

An error has occurred. Please try again later.

API Error Code: 1

API Error Description: An unknown error has occurred.

Error message: kError 1357038: Sorry, something went wrong: try closing and reopening your browser window.

Do you have any idea why this is happening?

+4
source share
1 answer

. , ( ...), , "" "".

, , :

private void postToWall() {
    Bundle parameters = new Bundle();
    parameters.putString("name", "Name");
    parameters.putString("description", "description");
    parameters.putString("link", "Link");
    parameters.putString("picture", "Picture");
    parameters.putString("display", "page");

    facebookClient.dialog(MainActivity.this, "feed", parameters, new DialogListener() {

        @Override
        public void onFacebookError(FacebookError e) {
            LogFileHandler.writeToLog(e.getMessage());
        }

        @Override
        public void onError(DialogError e) {
            LogFileHandler.writeToLog(e.getMessage());
        }

        @Override
        public void onComplete(Bundle values) {

        }

        @Override
        public void onCancel() {
            Toast.makeText(getApplicationContext(), "Published Cancelled", Toast.LENGTH_SHORT).show();
        }
    });
}

parameters.putString("caption", "caption");

(parameters.putString(key, value);) ( ") , . , , " " ()

:

parameters.putString("description", "");

"" () ( )

, Facebook

, : , , .

Update:

, this

+4

Source: https://habr.com/ru/post/1525778/


All Articles