URLs used to create a post
-
Hi,
I am trying to automate posting of new story by using HTTP requests as WordPress does. In the sniffer I see the following requests are executed:
POST /wordpress-3.4.1/wp-admin/admin-ajax.php action=autosave&post_ID=252&autosavenonce=232d498d57&post_type=post&autosave=1&post_title=hello&content=&catslist=&comment_status=open&ping_status=open&excerpt=&post_author=1&user_ID=1&auto_draft=1
POST /wordpress-3.4.1/wp-admin/admin-ajax.php action=sample-permalink&post_id=252&new_title=hello&samplepermalinknonce=34897f9459
POST /wordpress-3.4.1/wp-admin/post.php _wpnonce=51e490fa65&_wp_http_referer=%2Fwordpress-3.4.1%2Fwp-admin%2Fpost-new.php&user_ID=1&action=editpost&originalaction=editpost&post_author=1&post_type=post&original_post_status=auto-draft&referredby=http%3A%2F%2Flocalhost%2Fwordpress-3.4.1%2Fwp-admin%2Fedit.php&_wp_original_http_referer=http%3A%2F%2Flocalhost%2Fwordpress-3.4.1%2Fwp-admin%2Fedit.php&auto_draft=0&post_ID=252&autosavenonce=232d498d57&meta-box-order-nonce=af23c7e012&closedpostboxesnonce=fcfdbaeaee&post_title=hello&samplepermalinknonce=34897f9459&content=hello+world&wp-preview=&hidden_post_status=draft&post_status=draft&hidden_post_password=&hidden_post_visibility=public&visibility=public&post_password=&mm=09&jj=08&aa=2012&hh=12&mn=22&ss=00&hidden_mm=09&cur_mm=09&hidden_jj=08&cur_jj=08&hidden_aa=2012&cur_aa=2012&hidden_hh=12&cur_hh=12&hidden_mn=22&cur_mn=22&original_publish=Publish&publish=Publish&post_format=0&post_category%5B%5D=0&newcategory=New+Category+Name&newcategory_parent=-1&_ajax_nonce-add-category=3206edc76a&tax_input%5Bpost_tag%5D=&newtag%5Bpost_tag%5D=&excerpt=&trackback_url=&metakeyinput=&metavalue=&_ajax_nonce-add-meta=44749f1f27&advanced_view=1&comment_status=open&ping_status=open&post_name=&post_author_override=1
However, if I do the same thing from my own code (by using IDs that WP generated, I am parsing the HTML), the post has auto-draft status in MySQL instead of publish. Any idea what I am doing wrong?
Thanks in advance
- The topic ‘URLs used to create a post’ is closed to new replies.