harryk
04/04/2024, 10:52 AMtwitter = createObject("java", "twitter4j.Twitter").newBuilder()
.oAuthConsumer("CONSUMER", "TOKEN")
.oAuthAccessToken("TOKEN", "SECRET")
.build();
status = twitter.v1().tweets().updateStatus("Hello World");
Which will give me
"403:The request is understood, but it has been refused. An accompanying error message will explain why. This code is used when requests are being denied due to update limits (https://support.twitter.com/articles/15364-about-twitter-limits-update-api-dm-and-following). message - You currently have access to a subset of Twitter API v2 endpoints and limited v1.1 endpoints (e.g. media post, oauth) only. If you need access to this endpoint, you may need a different access level. You can learn more here: https://developer.twitter.com/en/portal/product code - 453"
Also monkehTweets (@monkeh.me) and so on had a similar issue:
<cfset monkehTweet = new <http://monkehTweets.com|monkehTweets.com>.coldfumonkeh.monkehTweet(
consumerKey = '...',
consumerSecret = '...',
oauthToken = '...',
oauthTokenSecret = '...',
userAccountName = '@ApiContens',
parseResults = true,
timeout = 250
)>
<cfset dataReturn = monkehTweet.postUpdate('Nothing to see here.. just testing something. Move along.')>
<cfdump var="#dataReturn#">
Result:
You currently have access to a subset of Twitter API v2 endpoints and limited v1.1 endpoints (e.g. media post, oauth) only. If you need access to this endpoint, you may need a different access level. You can learn more here: https://developer.twitter.com/en/portal/produc
I would like to post a simple tweet e.g.
curl --location '<https://api.twitter.com/2/tweets>' \
--data '{
"text": "Hello World!"
}' --header 'Authorization: Bearer {%Bearer Token%}'
But this doesn't work with the bearer token from the developers portal.
Any idea on how to set the correct Authorization?
Thanks a lot!Rodney
04/04/2024, 11:51 AMharryk
04/04/2024, 12:07 PMharryk
04/04/2024, 12:12 PMAdam Cameron
quetwo
04/04/2024, 12:40 PMharryk
04/04/2024, 1:08 PMharryk
04/04/2024, 1:12 PMquetwo
04/04/2024, 1:20 PMAdam Cameron