[英]Twitter API - Reply to a retweet
我正在編寫一個小的twitter API(使用Elliot Haughin的library ),我想回復該應用發布的轉發。
我已經閱讀了Statues / update的文檔,並嘗試將'* in_reply_to_status_id *'與'* user_mentions *'的值一起使用,但是它似乎不起作用。
我做錯了什么,還是有更好的方法呢?
代碼樣本;
$answer = '@'.$retweet->entities->user_mentions[0]->screen_name.' thanks!!';
$this->tweet->call('post', 'statuses/update', array('status' => $answer, 'in_reply_to_status_id' => $retweet->id));
您應該包括轉發該帖子的用戶名,而不是該帖子中提到的用戶名。
$answer = '@'.$retweet->user->screen_name.' thanks!!';
當然,為此,您應該使用include_entities => 1
請求推文
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.