2
我已經在item.update中設置了一個webhook,在hook_update_item.php文件中。我想要做的,如果某個項目已更新,我想在新標籤中最好打開鏈接,這裏是我的代碼:Podio item.update webhook打開一個新的鏈接
<?php
require ("../podio/PodioAPI.php");
Podio::setup(Client ID, Client Secret);
Podio::authenticate_with_app(App ID, App Token);
switch ($_POST['type']) {
case 'hook.verify':
// Validate the webhook
PodioHook::validate($_POST['hook_id'], array('code' => $_POST['code']));
case 'item.update':
// Do something. item_id is available in $_POST['item_id']
if ($_POST['item_id'] == '238777597'){
//open new link here
$ch = curl_init('http://www.google.com.ph');
curl_exec($ch);
}
}
?>
波迪奧網絡掛接已被驗證,所以我假設當webhook發射它去'item.update'。但到目前爲止沒有運氣提出一個新的谷歌頁面標籤。欣賞任何提示和建議!