2015-11-09 9 views
8

Quindi sono bloccato cercando di capire come retwittare un tweet con un commento, questo è stato aggiunto a Twitter di recente.Come utilizzare Tweepy per retweet con un commento

questo è quando si fa clic su retweet e si aggiunge un commento al retweet e si ritwittano. fondamentalmente questo è quello che sto parlando:

enter image description here

stavo guardando l'API e conto di trovare un metodo dedicato a questo. E anche il metodo retweet non ha un parametro in cui posso passare il testo.

Quindi mi chiedevo c'è un modo per fare questo?

+0

Strano update_status sta lavorando per me. Hai provato 'api.update_status (stat_forme, tweet_cid)' perché il suo lancio di un errore di sintassi usando il tuo codice – Harwee

+0

'api.update_status (stat_forme, tweet_cid)' funziona 'api.update_status (stat_forme)' non funziona ... 403 cattiva richiesta ma se aggiungo lo stato come questo funziona 'api.update_status (status = stat_forme)' – user4335407

risposta

12

Tweepy non dispone di funzionalità retweet con il proprio testo, ma cosa potete fare è fare un URL come questo https://twitter.com/<user_displayname>/status/<tweet_id> e includerlo con il testo che si desidera lasciare un commento. Non è un retweet ma stai incorporando il tweet nel tuo nuovo tweet.

user_displayname - nome visualizzato della persona, di cui si sta Tweet retweeting

tweet_id - Tweet ID di Tweet che si sta retweeting

+0

Grazie funziona come un fascino: D – user4335407

Problemi correlati