Hi MDP,
I ran the code in 0.7 and 0.8. The number reported by ownerFriends.getTotalSize() are 9 and 5 respectedly. According to 0.8 documentation
opensocial.collection.getTotalSize()
Gets the total size of the larger result set that this collection belongs to.
I have a total of 9 friends so 0.7 is reporting the correct number but not in 0.8.
This is important because when a user has a lot of friends, it will be nice to able to do paging.
It will be greatly appreciated if you could look into this issue.
function getFriends() {
var req = opensocial.newDataRequest();
var opt_params = {};
opt_params[opensocial.DataRequest.PeopleRequestFields.FIRST] = 1;
opt_params[opensocial.DataRequest.PeopleRequestFields.MAX] = 5;
var idSpec = (opensocial.newIdSpec? opensocial.newIdSpec({'userId':'OWNER', 'groupId':'FRIENDS'}):"OWNER_FRIENDS");
req.add(req.newFetchPeopleRequest(idSpec, opt_params),'ownerFriends');
req.send(getFriends_callback);
}
function getFriends_callback(dataResponse) {
var ownerFriends = dataResponse.get('ownerFriends').getData();
console.log(ownerFriends.getTotalSize());
}