Ning Developer Docs

My first day messing with Ning.

I'm trying to follow the docs at https://developer.ning.com/notes/REST_API_Request_URL_Syntax and at https://developer.ning.com/notes/Atom_API_Querying_Examples

For examples sake, my network name is muchos and my Ning username is Stefan Richter. I now want to retrieve my user profile info and I do this:
http://muchos.ning.com/xn/atom/1.0/profile(id='Stefan Richter') -> empty result
Why is this result empty?

I then tried http://muchos.ning.com/xn/atom/1.0/profile(id='david') and I got a resutl for - you guessed it - david. But why? There's no David on muchos...?

Lastly, http://muchos.ning.com/xn/atom/1.0/profile gives me a bunch of names. Can someone tell me where they come from? Am I missing something crucial here?

Trying to make sense of this API. All I want to do is retrieve the details for the currently logged in user.

Regards,

Stefan

Views: 6

Replies to This Discussion

ah ok, thanks for the reply again.
So this kinda makes sense - but how would I retrieve my member's number? Or what would my user name be (are you saying I have another 'internal' ning username that is different from my screen name)?

And where is this stuff documented? It seems to be the most basic stuff anyone would want to do when starting to use the ning API....

heck I am confused :-)

And just to confirm: my own member number would not be good enough either. I need to be able to retrieve the current user's member number of anyone visiting my pages. I would need to be able to retrieve their user details and then log them into my chat app. I need to figure out two basic steps: how to retrieve the user identifier (whatever that is, member number, name, userid, I don't care) and pass that to my SWF. The SWF would then use the XML API to query all the user details. Simple really, but I haven't yet tracked this info down.
Try using 3g5fbdqlgnd2i instead of 'Stefan Richter'. The username on ning, used to be something you could choose (for example, mine is fabricio, because I registered before the username choice was discontinued) but now it is just a random hash. So everytime you need the "username" you will have to look for this somewhere first since it is not very easy to guess what a username will be for someone (registered after October 6 2007), here is a couple of ways you can find the username of someone:

1- hover your mouse over someone's name on a forum post or the members page, you will see something like this as the url: http://developer.ning.com/xn/detail/u_3g5fbdqlgnd2i the username is what comes after the u_

2- query the User content object and look at the author for that object aka contributorName

I guess your confusion is because the profile entrypoint of ning API is about the user accounts on ning, which covers not only members of social network applications, but all ning(the platform) members.

I believe what you want is in fact User objects, that are objects representing users on social network applications built on Ning. For that, try:

http://muchos.ning.com/xn/atom/1.0/content(type=%27User%27)

But since User objects are normally private, you will have zero results on that as well, unless you ask for it under a authenticated https request…
thank you, I will try an authenticated https request. Going to read up on that...
I've had a bit more of a read and I am not getting very far. It's a bit ridiculous really, Ning seem to publish tons and tons of API docs but very few (almost none) usable examples...
The docs also appear to be a bit misleading, for example the REST Operations doc states: "Any operation that creates, updates, or deletes data can only be performed by the owner of the target app." It then goes on to explain what's needed for authenticated access, but provides no code samples.

But as Fabricio pointed out I also seem to require HTTPS auth even though all I want to do is retrieve the details for the currently logged in user. Not create, update or delete, but retrieve.

What gives?
I don't feel I have time to teach myself all of this but I'm happy to pay someone for their time to help me
- create a page on my network (I have source access) which passes the identifier (whatever that may be, userid, email, I don't care) of the currently logged in user to my SWF
- create a PHP script for me which will accept that same user identifier as a POSTed variable and return (in XML format) the available details about that user

Should be easy for someone who's familiar with the ins and outs of the Ning API.

Cash waiting...

stefan AT flashcomguru DOT com

thanks.
Amen, brother! 'Ridiculous' isn't the word. The online documentation purports to be simple and straightforward, but in reality is anything but.
Heck, I've been staring at it for weeks -- even begged Ning for some concrete examples -- and if it weren't for the kindness of strangers (who post their own home-brew code) I doubt I'd ever see a workable example of REST or XN or whatever.
Bless Ning for providing the APIs and the many well-meaning attempts at "documentation", I know their heart is in the right place. (Trying to plow your way through Google's "Maps" API is no picnic, either. These days, we're lucky to find a table or diagram without errors or typos, don't you agree?)
But the current mish-mash of "networks you need to join" just to BEGIN to start searching for code and API's -- which you don't have the benefit of knowing they even EXIST, much less what they accomplish -- is vexing even to us "smart people".
Ning, if you're reading this, PLEASE create some (centralized, cataloged, browsable, complete, exhaustive, structured) API documentation that doesn't read like a story book!
+1 on this.
Whenever you document an API you should provide at least one usable example. Cut, paste, run. That way we can see how it's done.

I've all but given up on Ning now from a developer's point of view and I've set up a Drupal based site instead...

Stefan
I can certainly understand your decision, Stefan. Building my Ning site(s) has been TREMENDOUSLY time-consuming, and feels somewhat like pasting together a papier-maché tarantula. Sure, it can be done, but you never know precisely what you're gonna get. :-)
Sounds like you'd rather carve yours out of stone and get something solid in the process. Lucky for me that my Networks are mostly "for fun" and have zero deadlines. Heck, I'm still trying to figure out what the HTMLtidy algorithm does in Text Boxes!
Being a Ning creator has led me to learn more (from scratch) about Perl, Regex (I use it over on Yahoo! Pipes to feed my RSS boxes), WebDav, HTML, CSS, JavaScript, Google (Calendar, Gmail, Apps, Analytics, Sites, Pages, Groups, etc.), etc. than the last 15 years of being a journeyman 'webmaster' and tinkerer.
That's good for me. That would SUCK for lots of Ning-creator wannabes!
I'm leaving this reply public so others can see where giants have feared to tread. :-)

RSS

© 2026   Created by Ning Developer Admin.   Powered by

Badges  |  Report an Issue  |  Terms of Service