我正在使用Twitters OAuth构建我的第一个系统并遇到一些问题.
首先,我正在使用亚伯拉罕的Twitter类,我已经按照本教程.但是,我在callback.php上获得了这些行:
Warning: array_merge() [function.array-merge]: Argument #2 is not an array in C:\xampp\htdocs\twitter\twitterOAuth\OAuth.php on line 301
Warning: strtoupper() expects parameter 1 to be string, array given in C:\xampp\htdocs\twitter\twitterOAuth\OAuth.php on line 373
Oops - an error has occurred.
SimpleXMLElement Object
(
[request] => /account/verify_credentials.xml
[error] => Could not authenticate you.
)
Run Code Online (Sandbox Code Playgroud)
这是Twitter级的问题,还是我做错了什么?正如教程所说,我在config.php中有我的消费者密钥和消费者秘密,但我应该存储其他东西吗?
Martti Laine
Snipe.net教程适用于旧版本的TwitterOAuth.请务必阅读新文档
http://github.com/abraham/twitteroauth/blob/master/DOCUMENTATION
通常,对新版本的更新正在改变:
$content = $to->OAuthRequest('https://twitter.com/account/verify_credentials.xml', array(), 'GET');
至:
$content = $to->get('account/verify_credentials');
| 归档时间: |
|
| 查看次数: |
13465 次 |
| 最近记录: |