You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+31-15Lines changed: 31 additions & 15 deletions
Original file line number
Diff line number
Diff line change
@@ -1,8 +1,8 @@
1
1
codebird-php
2
2
============
3
-
*Easy access to the Twitter REST API, Collections API, Streaming API, TON (Object Nest) API and Twitter Ads API — all from one PHP library.*
3
+
*Easy access to the Twitter REST API, Direct Messages API, Account Activity API, TON (Object Nest) API and Twitter Ads API — all from one PHP library.*
@@ -131,6 +132,13 @@ In this case, you don't need to set the consumer key and secret.
131
132
For sending an API request with app-only auth, see the ‘Usage examples’ section.
132
133
133
134
135
+
### A word on your callback URL
136
+
137
+
Twitter is very restrictive about which URLs may be used for your callback URL.
138
+
For example, even the presence of the ‘www’ subdomain must match with the domain
139
+
that you specified in the settings of your app at https://developer.twitter.com/en/apps.
140
+
141
+
134
142
Mapping API methods to Codebird function calls
135
143
----------------------------------------------
136
144
@@ -240,7 +248,7 @@ The library returns the response HTTP status code, so you can detect rate limits
240
248
I suggest you to check if the ```$reply->httpstatus``` property is ```400```
241
249
and check with the Twitter API to find out if you are currently being
242
250
rate-limited.
243
-
See the [Rate Limiting FAQ](https://dev.twitter.com/rest/public/rate-limiting)
251
+
See the [Rate Limiting FAQ](https://developer.twitter.com/en/docs/basics/rate-limiting)
244
252
for more information.
245
253
246
254
Unless your return format is JSON, you will receive rate-limiting details
@@ -325,7 +333,7 @@ print_r($reply);
325
333
Here is a [sample Tweet](https://twitter.com/LarryMcTweet/status/475276535386365952)
326
334
sent with the code above.
327
335
328
-
More [documentation for uploading media](https://dev.twitter.com/rest/public/uploading-media) is available on the Twitter Developer site.
336
+
More [documentation for uploading media](https://developer.twitter.com/en/docs/media/upload-media/overview) is available on the Twitter Developer site.
**Find more information about [accepted video formats](https://dev.twitter.com/rest/public/uploading-media#videorecs) in the Twitter Developer docs.**
426
+
**Find more information about [accepted media formats](https://developer.twitter.com/en/docs/media/upload-media/uploading-media/media-best-practices) in the Twitter Developer docs.**
416
427
417
428
:warning: When uploading a video in multiple chunks, you may run into an error `The validation of media ids failed.` even though the `media_id` is correct. This is known. Please check back in the [Twitter community forums](https://twittercommunity.com/tags/video).
Collections are a type of timeline that you control and can be hand curated
486
501
and/or programmed using an API.
@@ -490,12 +505,13 @@ often they will be decomposed, efficient objects with information about users,
490
505
Tweets, and timelines grouped, simplified, and stripped of unnecessary repetition.
491
506
492
507
Never care about the OAuth signing specialities and the JSON POST body
493
-
for POST collections/entries/curate.json. Codebird takes off the work for you
508
+
for POST and PUT calls to these special APIs. Codebird takes off the work for you
494
509
and will always send the correct Content-Type automatically.
495
510
496
-
Find out more about the [Collections API](https://dev.twitter.com/rest/collections/about) in the Twitter API docs.
511
+
Find out more about the [Collections API](https://developer.twitter.com/en/docs/tweets/curate-a-collection/overview/about_collections) in the Twitter API docs.
512
+
More information on the [Direct Messages API](https://developer.twitter.com/en/docs/direct-messages/api-features) and the [Account Activity API](https://developer.twitter.com/en/docs/accounts-and-users/subscribe-account-activity/overview) is available there as well.
497
513
498
-
Here’s a sample for adding a Tweet using that API method:
514
+
Here’s a sample for adding a Tweet using the Collections API:
499
515
500
516
```php
501
517
$reply = $cb->collections_entries_curate([
@@ -511,7 +527,7 @@ var_dump($reply);
511
527
TON (Twitter Object Nest) API
512
528
-----------------------------
513
529
514
-
The [TON (Twitter Object Nest) API](https://dev.twitter.com/rest/ton) allows implementers to upload media and various assets to Twitter.
530
+
The [TON (Twitter Object Nest) API](https://developer.twitter.com/en/docs/ads/audiences/overview/ton-upload.html) allows implementers to upload media and various assets to Twitter.
515
531
The TON API supports non-resumable and resumable upload methods based on the size of the file.
516
532
For files less than 64MB, non-resumable may be used. For files greater than or equal to 64MB,
517
533
resumable must be used. Resumable uploads require chunk sizes of less than 64MB.
@@ -597,7 +613,7 @@ fclose($fp);
597
613
Twitter Ads API
598
614
---------------
599
615
600
-
The [Twitter Ads API](https://dev.twitter.com/ads/overview) allows partners to
616
+
The [Twitter Ads API](https://developer.twitter.com/en/docs/ads/general/overview) allows partners to
601
617
integrate with the Twitter advertising platform in their own advertising solutions.
602
618
Selected partners have the ability to create custom tools to manage and execute
Copy file name to clipboardExpand all lines: bower.json
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,7 @@
6
6
"Joshua Atkins <joshua.atkins@jublo.net>",
7
7
"J.M. <jm@jublo.net>"
8
8
],
9
-
"description": "Easy access to the Twitter REST API, Collections API, Streaming API, TON (Object Nest) API and Twitter Ads API — all from one PHP library.",
9
+
"description": "Easy access to the Twitter REST, Direct Messages, Account Activity, TON (Object Nest) and Twitter Ads API — all from one PHP library.",
Copy file name to clipboardExpand all lines: composer.json
+3-3Lines changed: 3 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
{
2
2
"name": "jublonet/codebird-php",
3
-
"description" : "Easy access to the Twitter REST API, Collections API, Streaming API, TON (Object Nest) API and Twitter Ads API — all from one PHP library.",
3
+
"description" : "Easy access to the Twitter REST API, Direct Messages API, Account Activity API, TON (Object Nest) API and Twitter Ads API — all from one PHP library.",
0 commit comments