Reputation: 21
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
Upvotes: 0
Views: 268
Reputation: 2051
Try to use
Bundle params = new Bundle();
params.putString("locale", "fr");
request.setParameters(params);
Upvotes: 1