Hi all, following a chat with Dani, I'm just posting an example of a jQuery OAuth implementation. Major updates to come over the next weeks and months, but it's a start. I'll be publishing the code once I've cleaned it up and de-noobified it somewhat. :)
You will! However, it seems like it isn't able to determine the forum name when you're in a sub-forum, like one of the sub-forums within Microsoft Windows. Are you sure you're pulling descendants and not just children?
OK, I think I tracked down the problem. If you have a top-level forum as your favourite, then children don't get taken into account in my code, so although the posts will be extracted, the program can't identify the forum as it has no id-title array item. OK, that went totally over my head until now. I've been beating my head against a wall as to why Forum 10 kept showing an undefined title. :)
//OK I think I've sorted it now - that was horrible :( Managed to sort it without a recursive function - but will probably need to do that to tidy up the code.
I extracted json from the nested forums (without descendants and include_self) as that allowed me to search children easily (nested loops).
Favorite forums have always been the same. It's just an array of forum IDs within /me. Just take that array of forum IDs and collapse it into a semi-colon delimited list, and fetch all those forums and all their descendants at once.
BTW - if I want to place more that one app on one site, should I create a new application for each or should I just use the one and reuse the same client id etc?
It's up to you with two caveats:
If you use clientside OAuth 2.0, the domain registered must match the domain the app resides on.
The application name and website is displayed when asking for authorization from end-users, so you'll want it to be a friendly name. Whether you create a single app or multiple apps from the same domain name would depend purely on end-user usability. There's no advantage or disadvantage.