0

我正在尝试使用库jmathai/twitter-async发送推文,但我得到一个没有消息的异常:

//not logged in:
if($oauth_token == '')
{
    try
    {

        $authorizationUrl = $twitterObj->getAuthorizeUrl();
        /*
        if (isset($authorizationUrl))
        {
            $twitterMessage = '<p>'._('twitter.signin.message').' : '.
            '<a href="'. $authorizationUrl.  '">'.
            '<img class="signin" src="images/sign-in.png" /></a></p>';
        }
        else
        {
        $twitterMessage .= '<p>'._('twitter.error.message').' (error 1)</p>';
        }
        */
    }
    catch(EpiTwitterException  $e)
    {
                $twitterMessage .= 'epiError '.$e->getCode() . ' ' . $e->getMessage();
    }
    catch(EpiOAuthException $e)
    {
                $twitterMessage .= 'oAutherror: '$e->getCode() . ' ' . $e->getMessage();
    }
}

这与“oAutherror:0”相呼应

这是结果var_dump($e->getTrace());

array(3) {
  [0]=>
  array(6) {
    ["file"]=>
    string(70) "/.../lib/jmathai-twitter-async/EpiOAuth.php"
    ["line"]=>
    int(404)
    ["function"]=>
    string(5) "raise"
    ["class"]=>
    string(17) "EpiOAuthException"
    ["type"]=>
    string(2) "::"
    ["args"]=>
    array(2) {
      [0]=>
      object(EpiCurlManager)#3 (2) {
        ["key:private"]=>
        string(14) "Resource id #8"
        ["epiCurl:private"]=>
        object(EpiCurl)#2 (9) {
          ["mc:private"]=>
          resource(7) of type (curl)
          ["msgs:private"]=>
          NULL
          ["running:private"]=>
          NULL
          ["execStatus:private"]=>
          NULL
          ["selectStatus:private"]=>
          NULL
          ["sleepIncrement:private"]=>
          float(1.1)
          ["requests:private"]=>
          array(1) {
            ["Resource id #8"]=>
            resource(8) of type (Unknown)
          }
          ["responses:private"]=>
          array(1) {
            ["Resource id #8"]=>
            array(6) {
              ["data"]=>
              bool(false)
              ["code"]=>
              int(0)
              ["time"]=>
              float(0)
              ["length"]=>
              float(0)
              ["type"]=>
              bool(false)
              ["url"]=>
              string(43) "https://api.twitter.com/oauth/request_token"
            }
          }
          ["properties:private"]=>
          array(5) {
            ["code"]=>
            int(2097154)
            ["time"]=>
            int(3145731)
            ["length"]=>
            int(3145743)
            ["type"]=>
            int(1048594)
            ["url"]=>
            int(1048577)
          }
        }
      }
      [1]=>
      bool(false)
    }
  }
  [1]=>
  array(6) {
    ["file"]=>
    string(70) "/.../lib/jmathai-twitter-async/EpiOAuth.php"
    ["line"]=>
    int(53)
    ["function"]=>
    string(5) "__get"
    ["class"]=>
    string(16) "EpiOAuthResponse"
    ["type"]=>
    string(2) "->"
    ["args"]=>
    array(1) {
      [0]=>
      string(11) "oauth_token"
    }
  }
  [2]=>
  array(6) {
    ["file"]=>
    string(44) "/.../main.inc.php"
    ["line"]=>
    int(29)
    ["function"]=>
    string(15) "getAuthorizeUrl"
    ["class"]=>
    string(8) "EpiOAuth"
    ["type"]=>
    string(2) "->"
    ["args"]=>
    array(0) {
    }
  }
4

1 回答 1

0

当我从文件夹(名为 ca_bundle.crt 的文件)中删除证书时,问题似乎已经解决了。

https://github.com/jmathai/twitter-async/issues/134

于 2012-10-04T10:53:51.623 回答