WordPress.org

Ready to get started?Download WordPress

Forums

JSON API
JSON API create_post, always create double posts (5 posts)

  1. Freshcode
    Member
    Posted 1 year ago #

    Hi,

    If I create a post using the create_post method, I always get double posts. I'm using a clean WordPress 3.5.1 install, this is what I do:

    I create a nonce
    http://myURL.com/app/get_nonce/?controller=posts&method=create_post

    With the nonce I create a post with the title "Daves Test"
    http://myURL.com/app/create_post/?nonce=nonce&title=Daves%20Test&status=publish

    This gives me two posts with the same title, different ID and Permalink. I'd like to have just one post. Anyone knows a solution?

    Thanks in advance,

    Dave

    http://wordpress.org/extend/plugins/json-api/

  2. agent207
    Member
    Posted 1 year ago #

    I'm having the exact same problem. Did you ever resolve it? If so, can you share with me? Thanking you in advance.

  3. agent207
    Member
    Posted 1 year ago #

    Dave are you having the problem when debugging the your app that calls the api? We noticed that if we let our app run it works correctly, but in debug mode it creates two wordpress post.

  4. agent207
    Member
    Posted 1 year ago #

    We are also using the authority version of json-api

    https://github.com/mimetic/wp-json-api-auth

  5. Freshcode
    Member
    Posted 1 year ago #

    Hello agent207,

    I haven't really had time to work on this project but I just tested it again, and now it's working as expected, with and without dev=1 in the URL.

    What exactly do you mean by debug mode?

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic