iScot
Forum Replies Created
-
Forum: Plugins
In reply to: [Redirection] Category & Tag redirectionFind out :
/tag/(.*)/ and /category/(.*)/
Thx everybody
Tom,
You saved my week ! It’s working. Yep, it was a misunderstanding.
I just had to add the “Cookie: NAME=VALUE” to the request for getting nonce too.
But, it would be pretty nice to have a easiest way to make it run by Ali’s API. I have to send 4 requests to make it run.
Ali, I’ll stand for your update asap.
Thanks
Thank you Ali. It would be great !
Hi everybody,
Ali, I confirm that your process gets success if and only if you try to execute all request from your browser and when you are logged in your site !
But as I mentioned before, my target is to make run a mobile app (front-end) with a web site designed on wordpress (back-end) ! That’s why all requests are written in a unique php script. In this case, it’s not working. doesn’t matter if i’m logged in browser or not.
Any idea ?
——————————————-
Tom, i finally find out my wordpress-logged-in cookie. I’m not sure that it should be written ike this in my script :
$json_url = “https://mydomainname/api/create_post/?nonce=” . $nonce . “&cookie=” . $cookie . “&author=” . $arg1 . “&title=” . $arg3 . “&content=” . $arg4 . “&status=publish”;
// Initializing curl
$ch = curl_init( $json_url );// Configuring curl options
$options = array(
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => array(‘Content-type: application/json’, ‘COOKIE_HEADER: wordpress_logged_in_09451d069f48070a06dbaa1d519fd5b8’)
);// Setting curl options
curl_setopt_array( $ch, $options );// Getting results
$result = curl_exec($ch);——————————————-
horsehcj, what are you trying to do precisely ?
Thank you Ali. I’m trying to create a post from my mobile app android (client side). Server side (wordpress) is hosted on a Godaddy server. I’m not using a browser. Mobile app communicate with backend from PHP & Json Api.
Ali I guess Yes. I check it several time ! I also tried with administrator. There is no problem with user capability
tfischer203 : I do not find that information. Is this a fixed value or reset periodically ?
Thanks…yes, i believe too. I’m trying to connect my app mobile to wordpress. So i’m using json api plugin and php script. In my script, i’m sending two json url (curl).
I’m sending requests below:
1-
https://localhost/api/get_nonce/?controller=posts&method=create_postBut it’s not working. I get this error : You need to login with a user that has ‘edit_posts’ capacity
When I try to make changes as mentionned higher, i got this error : Your ‘nonce’ value was incorrect. Use the ‘get_nonce’ API method.
Hope to be clear enough !
Hi, I’m trying to create a post from mobile app. But no way. I’ve the same problem. When I try all solutions suggested, I got a new error : “Your ‘nonce’ value was incorrect. Use the ‘get_nonce’ API method.”
Ali, you talk about another plugin ! Is there available ?
Any help would be welcome.
ThanksForum: Plugins
In reply to: [JSON API User] get xprofile dataMany thanks Ali
Forum: Plugins
In reply to: [JSON API User] User registration with s2memberHi Ali,
Thank you. I’ll wait for your pro version plugin.
But belive me, “wp_s2member_custom_fields” are stored in table “wp_usermeta”. s2member stors new custom fields there !
Thank
Forum: Plugins
In reply to: [JSON API User] User registration with s2memberDear Ali,
Thank you for your fast response. Your API works well. Except in the case where the meta-value must be stored as “serilized array”.
the end result should be:
meta_key = wp_s2member_custom_fields
meta_value =a:3:{s:12:”mobile_phone”;s:10:”0123456789″;s:12:”country_code”;s:2:”FR”;s:11:”postal_code”;s:5:”75016″;}But if I send the following URL:
json_url $ = “https://www.chkun.com/api/user/update_user_meta/?cookie=”. $ arg1. “& meta_key = wp_s2member_custom_fields & meta_value =”. $arg9;Where $arg9 = a:3:{s:12:”mobile_phone”;s:10:”0123456789″;s:12:”country_code”;s:2:”FR”;s:11:”postal_code”;s:5:”75016″;}
The stored value is:
s:103:”a:3:{s:12:”mobile_phone”;s:10:”0123456789″;s:12:”country_code”;s:2:”FR”;s:11:”postal_code”;s:5:”75016″;In summary instead of a table I get a string!
Any idea to what to do ?