File tree Expand file tree Collapse file tree 1 file changed +27
-0
lines changed
Expand file tree Collapse file tree 1 file changed +27
-0
lines changed Original file line number Diff line number Diff line change @@ -847,3 +847,30 @@ use the corresponding [`CURLPROXY_*` constants](http://php.net/curl_setopt), lik
847847``` php
848848$cb->setProxy('<host >', '<port >', CURLPROXY_SOCKS5);
849849```
850+
851+ ### …quote a Tweet?
852+
853+ Quoting a Tweet is different from a Retweet because you may add your own text.
854+ The original Tweet will appear below your quote.
855+ To quote a Tweet, add a link to the original Tweet to your quote, like in this sample:
856+
857+ ``` php
858+ $original_tweet = [
859+ 'id_str' => '684483801687392256',
860+ 'user' => [
861+ 'screen_name' => 'LarryMcTweet'
862+ ]
863+ ];
864+ $original_tweet = (object) $original_tweet; // sample, get real Tweet from API
865+
866+ $id = $original_tweet->id_str; // use the `id_str` field because of long numbers
867+ $screen_name = $original_tweet->user->screen_name;
868+
869+ // looks like this: https://twitter.com/LarryMcTweet/status/684483801687392256
870+ $url = "https://twitter.com/$screen_name/status/$id";
871+ $text = 'I’d like to quote a tweet.'; // maximum length = 140 minus 24 (link length) minus 1 space
872+
873+ $reply = $cb->statuses_update([
874+ 'status' => "$text $url"
875+ ]);
876+ ```
You can’t perform that action at this time.
0 commit comments