0

みなさん、こんにちは。この問題について誰かが私を助けてくれるのではないかと思います。私はTwitterAPIクラスを1年以上使用しています。先週、共有ホスティングからグリッドホスティングプランに移行しました。APIを使用するたびに、次のエラーが発生します。

Uncaught exception 'EpiOAuthException' in /home/content/98/3412598/html/twitter/EpiOAuth.php:434 Stack trace: 
#0 /home/content/98/3412598/html/twitter/EpiOAuth.php(404): EpiOAuthException::raise(Object(EpiCurlManager), false) 
#1 /home/content/98/3412598/html/twitter/EpiOAuth.php(45): EpiOAuthResponse->__get('oauth_token') 
#2 /home/content/98/3412598/html/twitter/ufollowme.php(13): EpiOAuth->getAuthenticateUrl() #3 {main} thrown in /home/content/98/3412598/html/twitter/EpiOAuth.php on line 434

私はこのライブラリを使用していますhttp://code.google.com/p/php-twitter/downloads/detail?name=php-twitter-1.1.zip&can=2&q=

これが私がずっと使ってきた最も単純なコードです。

include 'EpiCurl.php';
include 'EpiOAuth.php';
include 'EpiTwitter.php';
$consumer_key = 'REMOVED';
$consumer_secret = 'REMOVED';
$token = 'REMOVED';
$secret= 'REMOVED';
$twitterObj = new EpiTwitter($consumer_key, $consumer_secret, $token, $secret);
$twitterObjUnAuth = new EpiTwitter($consumer_key, $consumer_secret);
?>

<h1>Single test to verify everything works ok</h1>

<h2><a href="javascript:void(0);" onclick="viewSource();">View the source of this file</a></h2>
<div id="source" style="display:none; padding:5px; border: dotted 1px #bbb; background-color:#ddd;">
<?php highlight_file(__FILE__); ?>
</div>

<hr>

<h2>Generate the authorization link</h2>
<?php echo $twitterObjUnAuth->getAuthenticateUrl(); ?>

<hr>

<h2>Verify credentials</h2>
<?php
  $creds = $twitterObj->get('/account/verify_credentials.json');
?>
<pre>
<?php print_r($creds->response); ?>
</pre>

<hr>

<h2>Post status</h2>
<?php
  $status = $twitterObj->post('/statuses/update.json', array('status' => 'This a simple test from twitter-async at ' . date('m-d-Y h:i:s')));
?>
<pre>
<?php print_r($status->response); ?>
</pre>

<script> function viewSource() { document.getElementById('source').style.display=document.getElementById('source').style.display=='block'?'none':'block'; } </script>

どんな助けでも歓迎します。ありがとうございました

4

1 に答える 1

1

EPIOAUTH.php ファイルの行 171 ~ 172 の削除に回答する必要がある場合は、修正担当者を見つけてください。

   // if(isset($_SERVER ['SERVER_ADDR']) && !empty($_SERVER['SERVER_ADDR']) && $_SERVER['SERVER_ADDR'] != '127.0.0.1')
    //  curl_setopt($ch, CURLOPT_INTERFACE, $_SERVER ['SERVER_ADDR']);
于 2012-10-05T13:25:31.540 に答える