This can be a javascript issue. I was having this issue where I was not able to select "Settings" on the admin page. Everytime I click on settings and the page got refreshed. Later I found that there was a problem with the javascript call in my theme plugin.
This is how I suggest to check the issue:
Modify the elggx_userpoints_annotate_create() function to check if the $object->name == "likes". If that is the case retrieve the entity getting liked (get_entity($object->entity_guid)) and then check if the owner of this entity is a friend of the logged in user. If this is the case, proceed with adding userpoints, otherwise skip it.
$logged_in_user = elgg_get_logged_in_user_entity();
will fetch the user entity of the user logged in to the current session and assign in to the $logged_in_user variable.
You might want to take a look at the Elgg docs at http://learn.elgg.org/en/stable/guides/index.html to get some basic knowledge about coding Elgg plugins.
info@elgg.org
Security issues should be reported to security@elgg.org!
©2014 the Elgg Foundation
Elgg is a registered trademark of Thematic Networks.
Cover image by Raül Utrera is used under Creative Commons license.
Icons by Flaticon and FontAwesome.