0

I am using latest Facebook SDK for Android (3.0.2) and I want to retrieve notifications in a specified language. When I use this URL : me/notifications every thing works fine and I can receive data, but when I set URL : me/notifications?locale=fr_FR, I just receive empty object.

In facebook graph explorer both URLs work, but in my application only the first one is working.

This is my code :

            session = Session.getActiveSession();
            if (session != null && session.isOpened()) {
                Request request = Request.newGraphPathRequest(session, URLnotifications,
                        new Request.Callback() {

                    @Override
                    public void onCompleted( Response response) {

                        GraphObject object = response.getGraphObject();

                    }

                });

                request.executeAsync();

            } 

The problem is in this variable :

String URLnotifications = "me/notifications?locale=fr_FR"; // not working
String URLnotifications = "me/notifications"; // working
laalto
  • 150,114
  • 66
  • 286
  • 303
3afrit
  • 21
  • 1
  • 4

1 Answers1

1

Try to use

Bundle params = new Bundle();
params.putString("locale", "fr");
request.setParameters(params);
A.N.R.I
  • 1,931
  • 2
  • 15
  • 20