This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Other JSE/JEE APIs and the fly likes Parameter list to post comments on a Wordpress page Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Other JSE/JEE APIs
Bookmark "Parameter list to post comments on a Wordpress page" Watch "Parameter list to post comments on a Wordpress page" New topic
Author

Parameter list to post comments on a Wordpress page

Monu Tripathi
Rancher

Joined: Oct 12, 2008
Posts: 1369
    
    1

I am trying to post comments on a Wordpress page from a mobile application over HTTP. I have the target URL but no details of the parameters that need to be passed. Is there a formal parameter list that I can refer for achieving the aforementioned?

Not sure if this is correct forum; please move this post if required.

Thanks.


[List of FAQs] | [Android FAQ] | [Samuh Varta]
Monu Tripathi
Rancher

Joined: Oct 12, 2008
Posts: 1369
    
    1

Okay, I am not familiar with PHP so please excuse my ignorance here.

According to thispage there is a function wp-new-comment() which is to be invoked to add a new comment to the database. And the function takes just one parameter($commentdata).

Can I translate this to a GET/POST request?


Monu Tripathi
Rancher

Joined: Oct 12, 2008
Posts: 1369
    
    1

Apparently, we can invoke different functions on the PHP server of WordPress by sending appropriate XML-RPC requests. For posting new comments the details can be found XML-RPC: wp.newComment()

I skimmed through the XML-RPC spec and tried to hand-craft request XML myself. Not sure if I have got it right though:

Monu Tripathi
Rancher

Joined: Oct 12, 2008
Posts: 1369
    
    1

According to Wikipedia there are some java libraries that can help me with XML-RPC.
 
Don't get me started about those stupid light bulbs.
 
subject: Parameter list to post comments on a Wordpress page
 
Similar Threads
Best technical blog website?
Posting comments on WordPress blog via Java
Setting and getting application wide default values
Ajax : when a large no. of form fields
Creation of icepdf-core.jar and icepdf-viewer.jar from ICEPDF.