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

Add X limit handling and Logs Export button #903

Closed Soare-Robert-Daniel closed 6 months ago

Soare-Robert-Daniel commented 7 months ago

Summary

Changelog:

[!NOTE]
Make sure to read https://github.com/Codeinwp/rop-auth-service/pull/78 to get the full picture of the change.

Screenshots

Before

image (1)

After

image

image

image

Testing

Things to look for:

[!CAUTION] If you find an issue regarding the authentication values, please send the values in private.

Another thing to test: use the current version of RoP from WP.org, introduce your Twitter API via Sign In, then switch to the build from this PR. With this procedure, you will be connect to the current version of server (not the new one mentioned in above descriptions).

Try to share a post, you will receive an error about time limit reached, when you try again, you will get a message about when the time limit reset:

image

github-actions[bot] commented 7 months ago

Plugin build for 7a35cc251c05ee2402f6de17ef3031e079be1724 is ready :bellhop_bell:!

irinelenache commented 7 months ago

@Soare-Robert-Daniel Tested and here is what i found:

You can check on my instance:

 Admin area URL: https://rop-x-update.s3-tastewp.com/wp-admin 
 Username: irinel 
 Password: zlWFV9umnX4 
Soare-Robert-Daniel commented 7 months ago
  • [ ] I managed to share multiple posts using a free account and no API keys https://vertis.d.pr/i/C5LYQ9. I think because I already had some API keys generated, they got automatically linked in ROP, because this name 1704849955729629185IrinelOld (the application name set in twitter developer settings) appeared when i had to authorize the access.

Because the app was created with the testing account.

Since the stagging website used the same credentials from the testing account, when you regenerated the API keys, the one from stagging became obsolete.

  • [x] If i add the wrong API keys, i'm also getting a warning https://vertis.d.pr/i/B4XQTL
  • [ ] I didn't manage to connect the account with the Authentication tokens or OAuth 2.0 Client ID and Client Secret. It only connected with the Consumer Keys but the account appeared as inactive https://vertis.d.pr/v/arCJ7H

To my knowledge, we do not support those. Only the Consumer Keys.

Also, the reason you saw the error about services was pretty tricky to debug.

When you remove via a single action (the delete option that appears when making the account inactive), we do not remove all the data tied to that account. A function did not have a proper checking for it and gave the error.

Regarding the inactive state, I see that in the code it is done on purpose here: https://github.com/Codeinwp/tweet-old-post/blob/1b67a0b7c49b50d1a14be315c21c9033821a8681/includes/admin/services/class-rop-twitter-service.php#L311-L313

irinelenache commented 6 months ago

@Soare-Robert-Daniel Had another look and there is only one issue left:

 Admin area URL: https://ropx.s3-tastewp.com/wp-admin 
 Username: irinel 
 Password: eMvoZjhz0VE 
Soare-Robert-Daniel commented 6 months ago

@irinelenache, now it should work.

Also, I updated the staging server to use the same credentials as the normal app.

If you try to post with the Sign In, you will now get the quota limit from the real app.

You will get something like this:

image

ℹ️ If you test it when the quota reset, you might not see it.

irinelenache commented 6 months ago

@Soare-Robert-Daniel Checked again and everything's fine now 🚀

pirate-bot commented 6 months ago

:tada: This PR is included in version 9.0.23 :tada:

The release is available on GitHub release

Your semantic-release bot :package::rocket: