Need help? Check out our Support site, then


Get Posts by contributor over API

  1. Hello, I'm using XMLRPC to list all recent posts by an author regardless of blog. I've been working like a dog to locate relevant documentation, but its scattered all over the place.

    I first call wordpress.com/xmlrpc.php wp.getUsersBlogs for a given user, then for each blog I call their local xmlrpc url and ask for metaWeblog.getRecentPosts and filter out posts by users who aren't the user I'm concentrating on.

    My main problem seems to be that calling metaWeblog.getRecentPosts on a blog where the user is just a contributor (ie not admin) with the contributor's username and password will return nothing, even if the blog is public.

    I've read that this function used to return such posts but the behavior was changed about 3 years ago. Thats fine, but I need another way to get a user's posts off a public blog where they are contributing.

    The only thing I can think of is to parse RSS to get the same data on blogs where the user is not an admin, but seriously thats just retarded.

    Does anyone know anything I've overlooked? Thanks.

    The blog I need help with is texect.wordpress.com.

  2. I have one more method...

    Do what Google Bot does..

    Design a web crawler to crawl all the blogs you want to and parsel html to filter and recognize the content...

    Feel free ask me any more questions on this :)

  3. Haha that doesn't seem that helpful.

    I've already written RSS parsers to do this for RSS blogs, but it makes no sense to use XMLRPC for some blogs and RSS for others.

  4. Above my pay-grade - but you might ask over at WordPress.ORG there are more programmers and system admin types there than here.

    The Codex over at WordPress.ORG also has all sorts of tidbits of info, you might try looking there also.

    http://wordpress.org/support/

    For more on the difference: http://support.wordpress.com/com-vs-org/

  5. @texect1
    I am confused about what kind of a blog you are trying to create here at WordPress.com Do you have the permission of the various authors to republish their material on the free hosted WordPress.com site in question or not?

  6. @TT - good catch - I missed that part

  7. WordPress.com does not provide the tools that are commonly used by sploggers so that we do not have blogs here that are auto-filled with content. I want to be clear on exactly what @texect1 is proposing to do, and whether or not he has obtained prior written permission from the copyright holders of the material he intends to fill a free hosted WordPress.com blog with. I also velieve it's important that @texect1to reads the ToS http://en.wordpress.com/tos/

  8. I'm creating a client for wordpress. One of the options is to get all posts, regardless of what blog it was posted on, of an author.

    So as a use case, lets say I have a user X who works for a company SuperCorp where he travels a lot, he may write posts for 3 different (all public) wordpress.com hosted blogs. He may have a personal blog where he posts about his tech purchases and other random things he finds interesting, he may have a travel blog where he posts about his exploits in different cities and countries as he travels for work, and he may contribute to a corporate blog for his work. Now he would be an admin at the two blogs he runs personally, but just a contributor to the corporate blog.

    I want to enable someone to click on user X's name and have an option to show ALL public posts, regardless of which wordpress.com blog it was posted on, that were written by this user.

    I'm restricting this client to only wordpress.com blogs.

  9. I think you should connect with the people at WordPress.org anyway, as they are much more developer-minded and this sounds like something that would be of interest to all users of the WordPress software, whether .com or .org. In fact, it sounds like something that Gravatar and OpenID would be interested in (aren't they trying to do that already?).

    I don't think you can progress much here until you've connected with them there.

  10. As you are not proposing to simply link to the various published posts on the various blogs, but to actually import the content published elsewhere on another blog then you may also want to give some thought to what Google states about "duplicate content". Perhaps your best bet is to run what you want to accomplish by Staff.
    http://en.support.wordpress.com/contact/

  11. The only .COM to .COM workaround I can think of is to use the Widget that shows an RSS summery feed in the Sidebar - but if you have very many people your sidebar will get real long.

  12. I ran metaWeblog.getRecentPosts on my development site (using WP -trunk) and had no problem getting data from posts where the post author had the contributor role.

    More details on exactly why this isn't working for you would be helpful.

  13. @josephscott

    Yes YOU can as the admin use your admin username and password to call metaWeblog.getRecentPosts, but the guest author can NOT user his contributer username and password to get his posts from your blog using metaWeblog.getRecentPosts.

    I appreciate the feedback though.

  14. I didn't use an admin account in the API call. I did the following:

    - created a new user, gave it the contributor role
    - created a new post the new contributor user
    - called metaWeblog.getRecentPosts using the username and passsword of the new contributor account
    - got back the new post that the contributor user created

    Happy to investigate further if there is something that I missed.

  15. I've gotten busy just recently so I haven't been able to test again, but hopefully I'm just doing something wrong.

    That said, before I ever posted this (I'm texect1 btw) I found this post from 3 years ago:
    http://wordpress.org/support/topic/xmlrpc-038-getrecentposts-038-user-role

    It seems to corroborate my experience. But again, I hope I'm just doing something stupid.

Topic Closed

This topic has been closed to new replies.

About this Topic