try {
PeopleService peopleService = PeopleService.getInstance();
GetPeopleRequestBuilder builder = peopleService
.newGetViewersFriendsRequestBuilder();
builder.setFields("thumbnailUrl","email","id","name");
if (GadgetUtils.isCanvasView())
builder.setCount(100);
else
builder.setCount(20);
OsapiRequest<OsapiCollection<Person>> friends = builder.build();
Callback<OsapiCollection<Person>> callback = new Callback<OsapiCollection<Person>>() {
@Override
public void onFail(OsapiError error) {