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 Webhooks integration #985

Closed Soare-Robert-Daniel closed 2 months ago

Soare-Robert-Daniel commented 2 months ago

Summary

Added webhooks as an option to share posts.

Screenshots

Tab view

image

Popup

image

image

Instant sharing

image

Demo

https://github.com/Codeinwp/tweet-old-post/assets/17597852/1def452d-ee95-4a42-a2c2-f0d9e5ad9b81

Testing

[!NOTE] You will need a webhooks service.

[!WARNING] To test the functionality use https://github.com/Codeinwp/tweet-old-post-pro/pull/537

  1. Add the webhook via Popup
  2. Share on post.
  3. Check if the data is received.
pirate-bot commented 2 months ago

Plugin build for c5dd7464282d20241157b6db42c7bcbbd35b6b16 is ready :bellhop_bell:!

selul commented 2 months ago

for testing and also mentioninig in the documentation, this might be handy https://webhook.site/

selul commented 2 months ago

@Soare-Robert-Daniel is this ready? I've tried to test and I get this error:

[10-Jul-2024 16:56:54 UTC] PHP Fatal error:  Uncaught Error: Call to undefined method Rop_Webhook_Service::sign_in_url() in /Users/selul/Sites/rop/wp-content/plugins/tweet-old-post/includes/admin/class-rop-rest-api.php:877
Stack trace:
#0 /Users/selul/Sites/rop/wp-content/plugins/tweet-old-post/includes/admin/class-rop-rest-api.php(83): Rop_Rest_Api->get_service_sign_in_url(Array)
#1 /Users/selul/Sites/rop/wp-includes/rest-api/class-wp-rest-server.php(1230): Rop_Rest_Api->api(Object(WP_REST_Request))
#2 /Users/selul/Sites/rop/wp-includes/rest-api/class-wp-rest-server.php(1063): WP_REST_Server->respond_to_request(Object(WP_REST_Request), '/tweet-old-post...', Array, NULL)
#3 /Users/selul/Sites/rop/wp-includes/rest-api/class-wp-rest-server.php(439): WP_REST_Server->dispatch(Object(WP_REST_Request))
#4 /Users/selul/Sites/rop/wp-includes/rest-api.php(428): WP_REST_Server->serve_request('/tweet-old-post...')
#5 /Users/selul/Sites/rop/wp-includes/class-wp-hook.php(324): rest_api_loaded(Object(WP))
#6 /Users/selul/Sites/rop/wp-includes/class-wp-hook.php(348):  in /Users/selul/Sites/rop/wp-content/plugins/tweet-old-post/includes/admin/class-rop-rest-api.php on line 877
Soare-Robert-Daniel commented 2 months ago

@selul did you check it with this https://github.com/Codeinwp/tweet-old-post-pro/pull/537 ?

selul commented 2 months ago

@Soare-Robert-Daniel yes I do and you can easily check that the file has no method sign_in_url https://github.com/Codeinwp/tweet-old-post/blob/feat/webhooks/includes/admin/services/class-rop-webhook-service.php

Have you missed to push something?

selul commented 2 months ago

Tested and is working great.

Soare-Robert-Daniel commented 2 months ago

For future references: https://github.com/Codeinwp/tweet-old-post/pull/995

pirate-bot commented 1 month ago

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

The release is available on GitHub release

Your semantic-release bot :package::rocket: