Using IP.Board XML-RPC API - ipb

I write the application on Node.js and I need to get information from the forum, which works on the engine IP.Board. I decided to use XML-RPC API. On this issue there is an article In the administrative tools set support for XML-RPC API on the website of the IPB. I managed to get some information through the API, but I don't know how to authenticate a user.
My actions:
In the administrative tools set support for XML-RPC API
Add user and allow to perform all methods
Copy the key and use in my application
But when it comes to posting on the forum from outside I have trouble . Read the article linked above:
method postTopic
member_field: This should be the field to look up the 'member_key' in
(for instance, 'member_id', 'email', 'members_display_name', etc.)
member_key: The value to search in 'member_field' with in order to find the poster. You may pass member_field as ID and member_key as
1, for instance, to post a topic as member ID 1.
forum_id: The ID of the forum to post the topic in
topic_title: The topic title
post_content: The contents of the first post
Now I need to know the ID of the user on whose behalf to publish a post. How to know this?

I had a similar problem and simple solution is not found. You can write your extension for IPB and implement the necessary APIs themselves. Using IPB XML-RPC API (at the time of publication of the question), you can only yourself to find out the ID of a user and on his behalf to make the publication, publish answers or use other available options. For example, automatically check the availability of offensive language in the message and answer any warning.

Related

get recommended posts from own profile through api

Using the Medium API, is it possible to get all of the posts I have recommended (or clapped)?
Within my Medium profile, I can see the posts I have clapped (see image below). I wish to retrieve these through the API.
I'm not sure this is possible with the API, but you can do this using the RSS feeds. Here's the recommendations from my own Medium page:
https://medium.com/feed/#jamesjefferyuk/has-recommended
Replace the username with your own.
Based off Medium's API docs, there does not seem to be a forward facing endpoint to get your recommended posts. You could try to scrape your recommendations page, though I don't know if Medium's Terms of Service allow scraping, so if you're going to go that route, read through their terms to make sure you won't be putting your account in danger of getting banned, shutdown, etc.

Using the ProfileAdminService to Follow a user

I'm trying to figure out if there's a way to use the ProfileAdminService (com.ibm.sbt.services.client.connections.profiles.ProfileAdminService) to get one user to follow another user.
I can see that you can do it via a put to /profiles/admin/atom/following.do but I was hoping to just use service.
I've investigated the FollowService but this only (at least that i can see) allows the current authenticated user to follow someone, but I want to be able to get any user to follow someone.
Thanks
The feature was not implemented in the IBM Social Business Toolkit SDK
you can look at the Code for ProfileAdminService and you'll see the methods do not include establishing a following relationship.
You need to use the REST API - http://www-10.lotus.com/ldd/lcwiki.nsf/xpAPIViewer.xsp?lookupName=IBM+Connections+5.0+API+Documentation#action=openDocument&res_title=Following_a_person_using_the_Administration_API_ic50&content=apicontent
with the specified body. You need to craft the URL properly in order to get the feature to work via the REST API

Eventbrite API: is there a way to access the waitlist?

We use EventBrite for managing some free events: works great.
We also make extensive use of the waitlist feature.
I would like to script the synchronisation of the EventBrite ticket list contacts (sold and waitlist) with another system.
(yes, I know, I can manage contacts in EventBrite. But we have an existing system and I want to keep using that)
There does not appear to be an obvious way to retrieve any information about people on the waitlist via the API? Is this possible?
Each of the available API access methods are listed here:
http://developer.eventbrite.com/doc/#methods
Waitlists are not currently available.
This should do the trick. Run it in your web browser to see an xml list of all attendees:
https://www.eventbrite.com/xml/event_list_attendees?id=123456&app_key=your_app_key
You'll have to signup for a developer's key to run the query though: https://www.eventbrite.com/api/key/
The down and dirty method to get the eventID to make sure it's working is to view the page source of your EventBrite page, and search for "eventID" or "eid".
You can get the event id through the EventBrite API as well: http://developer.eventbrite.com/doc/events/

Twitter API: how to know what application was used to follow

In the email notification we can see something like
<username> followed you using <appname>.
It is great. But is there any possible way to know the application name using API?
I took a look through the REST API, and I could not find anything that would support this. My guess is that this is a twitter.com feature that is available in the API (yet).
The most logical places I looked were statuses/followers and friendships/show. In both cases there was nothing definitive. Checking the follower emails for my account, I found multiple followers that used applications (like PeopleBrowr and SocialOomph) to follow the account. In most cases, the source on their latest status object matched the application name used to follow me, but that was definitely not a sure thing.
So, to answer your question directly, no I don't think it can be done through the API (not unless there's an undocumented method out there that does this.)
I can, however, think of a way to get that info. One approach would be to set up the email account receiving the follow notifications to forward a copy to a mailbox that is checked by an automated process. When emails show up, parse them to find the app name used to follow you.
I used the following regular expression (in C#) to find the application's name and URI in the email's body:
Match m = Regex.Match(input, #"followed you using\s*<a[^""]+""(?<appUri>[^""]+)""[^>]+>(?<appName>\w*)</a>");
I used m.Groups["appName"].Value to pull out the application name, and m.Groups["appUri"].Value to pull out the URI from the match.
In order to tie the app info to a user, I had to also find the screen name with:
Match m = Regex.Match(user, #"\(#<a[^>]+>(?<screenName>\w*)</a>\) is now following");
I used m.Groups["screenName"].Value to extract the value from the match.

Some questions about dotnetopenauth

I have a couple outstanding questions mainly reguarding twitter and facebook
In the FacebookGraph class there are properties such as Id,name,etc. I am wondering how do I add to this list? Like what happens if I want a users hometown? I tried to add a property called hometown but it always is null.
What should I store their id(1418) or the whole url(http://www.facebook.com/profile.php?id=1418) for lookup later in my db to grab their data and to see if they have an account with my site?
Is it actually good to use this id as it seems like it is common knowledge. Can't someone just find the profile id or whatever and do a fake request on my site?
how do you setup dotnetopenauth to deal with the case when a user goes to facebook and deletes access to my website. I know you can send a deauthorization code to your site and then delete their account but I don't know how to do that through dotnetopenauth
Twitter
Is it possible to do number 4 with twitter?
Ajax
Is it possible to make the openid stuff ajax? I don't see a sample anywhere in the dotnetopenauth samples.
I'm no pro at Facebook. But the FacebookGraph class is in the ApplicationBlock, which ships as source and is fully intended for you to customize or extend within your own application. Hopefully people more familiar with Facebook in particular, or the Facebook docs, can help you with those questions.
Since Facebook is not OpenID, what you store whether ID # or the whole URL, is less critical. People should not be able to just craft requests to log in as others because your site should be verifying signatures, etc. If you're using DotNetOpenAuth appropriately this is probably being done automatically for you. But without seeing your code it can't be said for sure.
Assume the id is common knowledge. It certainly isn't a long random number so anyone can guess it. The ID must be accompanied by a signature that verifies that Facebook sent the ID, just now, for you.
I suspect the deauthorization code isn't going to be relevant to DotNetOpenAuth -- that's probably just some URL that you respond to. But again, I haven't read the FB docs on this.
Here's the real answer I can give you. Yes, OpenID works with AJAX reasonably well. You can see some samples of this at nerddinner.com or a sample of a blog post comment system. The most complete AJAX demonstration for standard login may be in the web forms or MVC project templates available on the Visual Studio Gallery.

Resources