I've been struggling on and off for a few days trying to work with the REST interface to embed a list of members of my network along with their profile photos into an external site.
It seems like I should be able to obtain a list of members using this REST url:
https://rockriverstar.ning.com/xn/atom/1.0/content(type='Users')?order=createdDate@D
But this URL returns no results when I know there are several.
Reading some threads in the forum, it seems that I may need to authenticate to Ning to obtain this listing. This is not a problem as I intend to obtain the listing via PHP on my server and cache it for a while anyway. But basing my code on the sample code I found here, I have been unable to obtain a list of members of my network:
http://restdemos.ning.com/code.php
I have tried using curl to connect to Ning with CURLOPT_USERPWD on a GET request of the URL above, but I get the same empty results. Only when I try to publish new content to the network does the authentication seem to do anything.
Can someone please point me to some sample code in PHP that does what I want? It seems like listing members would be a pretty common task. If that's not available, are there any hints or documentation of how to get (not insert) "private" data like a member listing from the network using PHP?
Thanks,
Owen Winkler
Tags: api, atom, auth, http, member, php, private, rest
Share
-
▶ Reply to This