• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Posting comments on WordPress blog via Java

 
Monu Tripathi
Rancher
Posts: 1369
1
Android Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am working on a module that allows a user to post comments on a WordPress blog. The code for the same can be seen here.

Problem: This blog has Akismet plug-in activated which filters my comment as Spam. I need a way to circumvent this. Is there a setting that I can try (on either side of channel; I am also the blog owner) that can help circumvent this filtering? For e.g. is there a way(using HTTP headers etc.) that my client can identify with the back end so that it is considered authentic?

Please help. Thanks.
 
Monu Tripathi
Rancher
Posts: 1369
1
Android Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
As gathered from web, the filtering is done by Akismet if the posted comment contains hyperlinks - a "valid" comment is most likely to pass through; even though my comment contains plain text, it is getting filtered as spam.
 
Joe Ess
Bartender
Posts: 9320
10
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The post you link to says the code doesn't work. Why are you surprised that it doesn't work?
I've had better luck with Apache HttpClient than the Java API's HTTP functionality.
And yes, the site is probably checking for a valid user-agent in addition to forcing a redirect to throw off spammers.
 
Monu Tripathi
Rancher
Posts: 1369
1
Android Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Joe Ess wrote:The post you link to says the code doesn't work. Why are you surprised that it doesn't work?
I've had better luck with Apache HttpClient than the Java API's HTTP functionality.
And yes, the site is probably checking for a valid user-agent in addition to forcing a redirect to throw off spammers.


1. The OP in the linked post(Samuh) is me and that code works when I disable the Akismet plugin.
2. I am using Apache's HttpClient library.
3. Currently the USER-AGENT value passed is: HttpClient. Maybe I should try setting the user-agent to Mozilla or some other browser?
 
Joe Ess
Bartender
Posts: 9320
10
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Monu Tripathi wrote: Maybe I should try setting the user-agent to Mozilla or some other browser?


That is the first thing I'd try.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic