-1

I am getting this error while trying to open user facebook page.The code worked perfectly until the last facebook Graph API update. What changes should I make?

Also this issue exists on iOS version of the app.

The way I am opening facebook page of user:

  Intent intent;
        try {
            context.getPackageManager().getPackageInfo("com.facebook.katana", 0);
            intent = new Intent(Intent.ACTION_VIEW, Uri.parse("fb://facewebmodal/f?href=" + currentUser.getLink()));
            context.startActivity(intent);
                     } catch (Exception e) {
            intent = new Intent(context, FacebookWebViewActivity.class);
            intent.putExtra(AppConstants.USER_LINK, currentUser.getLink());
            context.startActivity(intent);
            }

The GraphRequest method:

public void makeGraphRequest(AccessToken token) {
        GraphRequest request = GraphRequest.newMeRequest(
                token, (object, response) -> {
                   ...
                });
        Bundle parameters = new Bundle();
        parameters.putString("fields", "name,link,gender");
        request.setParameters(parameters);
        request.executeAsync();
    }
Levon Petrosyan
  • 8,815
  • 8
  • 54
  • 65

0 Answers0