Codeinwp / tweet-old-post

Plugin to tweet about your old posts to get more hits for them and keep them alive.
GNU General Public License v2.0
13 stars 16 forks source link

Twitter API issue - unable to share to Twitter #878

Closed purplecodes closed 11 months ago

purplecodes commented 1 year ago

Description

The latest release does not appear to resolve the Twitter issue. A lot of customers reporting that they are still getting an error. I tested on my end and I still get the same.

Screenshot 2023-07-29 at 9 41 10 PM

Step-by-step reproduction instructions

  1. Install and activate the Revive Old Posts plugin.
  2. Add your Twitter account.
  3. Start sharing by clicking the green button on the top right.
  4. Check the Sharing Logs to see if the post has been successful shared or if there is an error.

Screenshots, screen recording, code snippet or Help Scout ticket

Tickets: https://secure.helpscout.net/conversation/2316683935/379703/ https://secure.helpscout.net/conversation/2317041550/379790/ https://secure.helpscout.net/conversation/2316110742/379602/ https://secure.helpscout.net/conversation/2316195696/379620/ https://secure.helpscout.net/conversation/2306284027/378272/ https://secure.helpscout.net/conversation/2310383068/378866 https://secure.helpscout.net/conversation/2312231208/379088/ https://secure.helpscout.net/conversation/2317075774/379796/ https://secure.helpscout.net/conversation/2317764107/379888?folderId=212385

Environment info

No response

Is the issue you are reporting a regression

Yes, this is a regression.

purplecodes commented 1 year ago

@selul v9.0.15, where the fix for Twitter and LinkedIn issues, is not pushed on wp.org, still shows v9.0.14. This might be the reason why the issue is the same. Please check, thanks.

selul commented 1 year ago

@purplecodes thanks for catching, should be fine now.

vytisbulkevicius commented 1 year ago

Hey @purplecodes, could you confirm if it got fixed with the latest version? I see there is a new ticket which you just replied about us investigating the issue. Thanks!

purplecodes commented 1 year ago

@selul, thanks for fixing however the issue is the same. The error is slightly different but it still mentions about Twitter API v2.

Screenshot 2023-07-31 at 10 02 34 PM

cc: @vytisbulkevicius

purplecodes commented 1 year ago

Please check this thread: https://wordpress.org/support/topic/update-on-twitter-api-please/ One of the users were able to make it work by creating an app inside https://developer.twitter.com. It will then generate an API key which he used to add his Twitter account in the ROP Dashboard. This was the process before on adding the Twitter account in ROP. There could be some changes that need to be done/updated inside the Revive Social dev account in Twitter.

Hope this helps.

girishpanchal30 commented 1 year ago

Hey @selul @vytisbulkevicius,

It seems an issue with Twitter Revive Social App token and keys or post sharing limition. Users can create their own APP using the below step.

@purplecodes

Add the below filter in the active theme functions.php file to show the Use your own keys settings. add_filter( 'option_rop_first_install_version', '__return_false' );

Twitter Developer

1) Login to https://developer.twitter.com with the Twitter account you want to use 2) Create an App 3) Add user authentication settings: “read & write”, “web app” 4) App info (make sure to change these to use your own domain!): 5) Callback/Redirect URL: https://example.com/wp-admin/admin.php?page=TweetOldPost 6) Website URL: https://example.com 7) Make sure to copy both your keys

Revive Old Posts plugin

1) Delete accounts from Revive Old Posts in WordPress 2) Choose to create/add a new account “Twitter” button 3) Choose “Use Your Own Keys” button 4) Enter your two keys 5) Login should proceed and everything will be activated 6) That’s it! The plugin will now be working once again.

Thanks

purplecodes commented 1 year ago

@girishpanchal30 regarding the steps on 'Revive Old Posts' plugin, when you add the Twitter account, there is only 'Sign in' button. No option to 'User your own keys'. https://vertis.d.pr/v/Z6V5ZO

girishpanchal30 commented 1 year ago

@purplecodes Please add below filter

Add the below filter in the active theme functions.php file to show the Use your own keys settings. add_filter( 'option_rop_first_install_version', '__return_false' );

purplecodes commented 1 year ago

Thank you, @girishpanchal30. I was able to add my account. I can create a video for this so it would be easier to follow. Is there anyway the old process can be brought back where you just sign in using your Twitter credentials instead of creating an app and generating API keys?

girishpanchal30 commented 1 year ago

@purplecodes We will try but it seems an issue with the Revive Social App token and keys or post-sharing API limitation.

vytisbulkevicius commented 1 year ago

@girishpanchal30, please try to check this further as we need it to be working as before without that filter and multiple steps.

girishpanchal30 commented 1 year ago

@vytisbulkevicius I've rechecked the code but there is no code related error, it seems error with Twitter API. @selul Can you please recheck Twitter Revive Social App APP?

girishpanchal30 commented 1 year ago

@vytisbulkevicius Can you please check now, it seems working now Ref: https://github.com/Codeinwp/tweet-old-post/assets/79647963/d9cc0b39-c6df-4e80-b754-b144ee87c011

kushh23 commented 1 year ago

having this error when trying with direct sign in - https://vertis.d.pr/i/u6V64T

girishpanchal30 commented 1 year ago

@kushh23 It seems issue with the Twitter endpoint, please retry after sometime. Ref: https://developer.twitter.com/en/support/twitter-api/error-troubleshooting#:~:text=A%20429%20error%20can%20deliver,endpoint%20per%20specified%20time%20period.

kushh23 commented 1 year ago

@girishpanchal30 Tried and got the same error

girishpanchal30 commented 1 year ago

@kushh23 Now it's working again, Please check and do let me know if you have any issues

kushh23 commented 1 year ago

@girishpanchal30 Yes, it is working fine now 🚀 One quick question, Do we need to follow the process of creating app on developer.twitter.com ?

purplecodes commented 1 year ago

@girishpanchal30 I tested again, adding my Twitter like normal without creating an app and generating API keys, I was able to share posts successfully.

girishpanchal30 commented 1 year ago

@kushh23

One quick question, Do we need to follow the process of creating app on developer.twitter.com ?

No, It's optional, so if you want to use your own Twitter app, you can connect it using the mentioned steps.

kushh23 commented 1 year ago

Okay thanks @girishpanchal30 🚀

kushh23 commented 1 year ago

Hey @girishpanchal30 , some users have replied that they are getting the same error shared here - https://vertis.d.pr/i/u6V64T

I tested the issue and was getting the same error with normal account and normal sign in but when I tried the steps mentioned above, I do not see any errors and the posts were shared properly.

Can you provide more insights about this? and check if there is a way for this to work without taking the extra steps?

girishpanchal30 commented 1 year ago

@kushh23

tried the steps mentioned above, I do not see any errors and the posts were shared properly.

because the user creates his own APP and connects to the specific website and it works properly.

Can you provide more insights about this? and check if there is a way for this to work without taking the extra steps?

It appears that the Revive Social App Twitter APP has reached its rate limit or post sharing limit and is now giving such kinds of errors.

Some reason Twitter automatically removed the "Revive Social App" from the Twitter project yesterday, @selul reverted the APP, and it started working again.

Thanks

stefan-cotitosu commented 1 year ago

hey @vytisbulkevicius, Kush and I tested the latest version of the plugin and when trying to share on Twitter without creating a new App in Twitter Developer portal, the plugin throws 429 error.

Screenshot at August 9th 2023 - 8 24 20 pm@1 25x

Is there any way it can work as before? In case not, I think we should follow up with all the customers who reported the issue in the first place and share the steps provided by AC - https://vertis.d.pr/v/pI8ylM.

We also tracked the number of tickets where this 429 issue as per the screenshot was reported, since the fix was released, and there are 18 cases.

Thank you.

selul commented 1 year ago

@stefan-cotitosu until we manage to have this in place https://github.com/Codeinwp/tweet-old-post-pro/issues/444, I think we can't change anything as Twitter has some limits per app that we can't really change. I.e they allow a fixed number of tweets thru the central app.

The only alternative would be to use the single app, until we manage to implement rate limits on our end to accommodate the new twitter limits.

stefan-cotitosu commented 1 year ago

Thank you, Marius. I understand, and your answer helps, as I just wanted to make sure we can provide an update to everyone who reported this issue.