- Issue created by @zarexogre
- π¬π§United Kingdom zarexogre
Figured this out wasnt easy. First you need to create an app within a project on twitter dev portal to get access to v2 apis.
Then there were 2 issues with the code.
First, the API call for getting profile data from twitter is v1.1 but the code is trying v2 which doesn't have this API call hence the 404.
Second, the tweet API call is to update status which seems to have gone, v2 has a free tweet API call so using that.
Now its working great. Docs could do with some love all very complicated.
Patch attached.
- Status changed to RTBC
10 months ago 9:18am 28 March 2024 - last update
10 months ago 3 pass - π§πͺBelgium mschudders
I tested this and it works.
Moving to needs review
- π¨π¦Canada mahde Vancouver
I was getting the following error while trying to add account in the user profile page and this patch fixed it!
TypeError: Drupal\social_api\User\UserManager::getDrupalUserId(): Argument #1 ($provider_user_id) must be of type string, null given, called in /var/www/html/web/modules/contrib/social_post_twitter/src/Controller/TwitterPostController.php on line 189 in Drupal\social_api\User\UserManager->getDrupalUserId() (line 89 of /var/www/html/web/modules/contrib/social_api/src/User/UserManager.php).