I too am struggling with this issue. The old (v1.1) app I used to use started returning the following error:
{"errors":[{"code":32,"message":"Could not authenticate you."}]}
So I logged into the Twitter developer portal to see if I could keep using it. I found that app listed in the "Standalone Apps" section, with this message:
The v1.1 APIs have been deprecated and your app is no longer able to access those v1.1 APIs. Please create a new application using one of our v2 Free, Basic or Pro plans today!
So then I created a v2 app, and added it to the Drupal 10 site I have, but that didn't pull in any more tweets - I got a new error (that chrisglubish listed above):
{"errors":[{"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}]}
From what I can tell, I have two problems:
- The free version of the v2 app doesn't allow you to lookup and pull in tweets - you can only create and delete tweets, and lookup users
- I'm not actually sure the syntax for the module works with v2; I think it still just supports v1.1
Sadly, I don't know that I have much useful to offer (other than what I've figured out above) - even if this module were updated to support v2 (which I would be very happy to see!) I think there's still the issue that pulling in existing tweets isn't supported by the free version of the v2 api. But I'd be happy to hear what anyone else has to offer.
Thank you for the patch! This worked great for me, on a 10.0.5 site running PHP 8.1.14 and with Views Reference Field at 8.x-2.0-beta4.
Any chance you can roll a new release for this? Or are you waiting for more feedback?