I am trying to programmatically get a river item, I thought i was doing it right but i cant get it working. Heres my code:
$river = elgg_get_river (array('object_guid' => "491344"));
foreach ($river as $entity) {
echo $entity->id;
echo $entity->guid;
}
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.
- Matt Beckett@Beck24
Matt Beckett - 0 likes
- Juho Jaakkola@juho.jaakkola
Juho Jaakkola - 0 likes
You must log in to post replies.http://reference.elgg.org/engine_2lib_2river_8php.html#a46c34fcb89d70f4573a1ca00282a40ea
Looks right at first glance.
You've checked that the object guid is correct? That the river entry exists? That the user fetching it has permissions to do so?
Lastly, I *think* object_guid should work and is normalized from the plural, but you can check by trying object_guids instead.
Yes, it's normalized. Both 'object_guid' and 'object_guids' are valid parameters.