-2
就像WordPress給我們留下評論,帖子等的API。我想獲取通知API代碼。WordPress通知其餘API代碼
developer.wordpress.com提供瞭如何使用通知API的文檔。
https://developer.wordpress.com/docs/api/1/get/notifications/ $ note_ID /。
要使用此API,我需要WordPress rest API通知代碼。
我該如何獲得該代碼。
WordPress休息API代碼沒有通知代碼。
https://wordpress.org/plugins/rest-api/
請幫幫我。
能否請你告訴我多一點?我已經在developer.wordpress.com doc選項卡中找到了此代碼。但是如果我通過郵遞員運行這個代碼,它會給我「找不到路由」的錯誤。 –
但是這個代碼是不是從developer.wordpress.com –
看到這一點:?https://developer.wordpress.com/docs/api/1.1/post/notifications/seen/ 陣列( 'ignore_errors'=>真, '方法'=> 'POST', '標題'=> 陣列( 0 => '授權:承載YOUR_API_TOKEN', 1 => '內容類型:應用/ X WWW的窗體-urlencoded', ) '內容'=> http_build_query(陣列( '時間'=> '1420936513', )), ), ); $ context = stream_context_create($ options); $ response = file_get_contents( '',false,$ context ); $ response = json_decode($ response);?> –