douchaqi3369 2015-01-22 16:41
浏览 15

Podio Auth。 “Array([error_parameters] => Array()[error_detail] => [error_propagate] => ..”

Starting out with podio API going no where fast..

<?php
define("CLIENTID", "###");
define("CLIENTSECRET", "####");
define("APPID", "###");
define("APPTOKEN", "#####");
require_once 'podio/PodioAPI.php';
Podio::setup($clientid, $clientsecret);
if (!Podio::isauthenticated())
{
    try {
        Podio::authenticatewithapp($appid, $apptoken);
    }
    catch(PodioError $e) {
        die(printr($e->body));
    }
}
?>

Output:

Array ( [errorparameters] => Array ( ) [errordetail] => [errorpropagate] => [request] => Array ( [url] => http://api.podio.com/oauth/token [querystring] => [method] => POST ) [errordescription] => Invalid value "" (string): must be integer [error] => invalidvalue ) 1

The issue is with

Podio::authenticatewithapp($appid, $apptoken);

Its not passing the data even though it was defined. I'm rusty coding and this is my first go with APIs.

  • 写回答

1条回答 默认 最新

  • dongrao9436 2015-02-11 00:50
    关注

    I'm pretty sure your $appid and $apptoken are not defined, and that is why you are getting the "" string, non integer error. You could set those with the approriate values. However, since you did define the constants APPID and APPTOKEN already, you could use those as shown here:

       Podio::authenticate_with_app(APPID, APPTOKEN);
    

    (also I am not sure why you are referring to the podio methods and even print_r() without the underlines, so it should be is_authenticated(), I assume your actual code is not that way or it wouldn't work)

    评论

报告相同问题?

悬赏问题

  • ¥15 seatunnel 怎么配置Elasticsearch
  • ¥15 PSCAD安装问题 ERROR: Visual Studio 2013, 2015, 2017 or 2019 is not found in the system.
  • ¥15 (标签-MATLAB|关键词-多址)
  • ¥15 关于#MATLAB#的问题,如何解决?(相关搜索:信噪比,系统容量)
  • ¥500 52810做蓝牙接受端
  • ¥15 基于PLC的三轴机械手程序
  • ¥15 多址通信方式的抗噪声性能和系统容量对比
  • ¥15 winform的chart曲线生成时有凸起
  • ¥15 msix packaging tool打包问题
  • ¥15 finalshell节点的搭建代码和那个端口代码教程