Hi, I changed settings for friends to one-way and call the cloud service friend.add with approval_required set to false. But in the Manage Data website I can see that the friend request is still not approved and therefore the friend is not returned at a search. If I approve it manually the friend is returned at a search.
Cloud.Friends.add({ user_ids: status.usersRanked[e.index], approval_required:false }, function (e) { if (e.success) { alert('Friend(s) added'); session.queryFriends(function(){ onGameStatus(); }); } else { alert('Error:\n' + ((e.error && e.message) || JSON.stringify(e))); } });
exports.queryFriends=function(onFinished) { Cloud.Friends.search({ user_id: exports.user_id, }, function (e) { if (e.success) { console.log('Success friends:\n' + 'Count: ' + e.users.length + ' '+JSON.stringify(e.users)); exports.friends=e.users; if (onFinished) onFinished(); } else { alert('Error:\n' + ((e.error && e.message) || JSON.stringify(e))); } }); };