【发布时间】:2019-04-03 21:31:19
【问题描述】:
我正在开发 Twitter Oauth API。正在开发的项目如下所示。
我遇到了问题,无法解决。问题是;我使用 POST 函数发送的 Twitter API 函数(例如 status'、友谊请求)确实有效。
但是,当包含 int 类型数据时,我得到以下内容
错误代码:32 消息:“无法对您进行身份验证。”
当我将 statuses/update 函数包含在 in_reply_to_status_id 函数或 favorites/create 之类的函数中时,我会得到这个,需要 int 类型数据 (ID) 的收藏夹/销毁、状态/转发、状态/取消转发。
Index.php 代码:(已放置我的应用消费者密钥)
<?php
session_start();
include("TwitterClass.php");
$twitter = new Twitter('srFixTitKV8f9WmJwF6VehhSF', 'GqSR29NQ0RoDBQ8gywQrsLV3vXowgFsSIMmueVQPm7E4ALAkNH');
$status = $twitter->post('statuses/update', ['status' => 'Test2!', 'in_reply_to_status_id' => '1057346977753636864'], true);
if ($status) {
echo 'Success!';
}
?>
可通过以下链接访问正在开发的项目的 GitHub 页面。感谢您的帮助。
【问题讨论】: