Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Twitter fix 2 #97

Merged
merged 2 commits into from
Dec 16, 2024
Merged

Twitter fix 2 #97

merged 2 commits into from
Dec 16, 2024

Conversation

murdercode
Copy link
Owner

@murdercode murdercode commented Dec 16, 2024

This pull request includes significant updates to the TwitterShortcode class in the src/Shortcodes/TwitterShortcode.php file. The changes primarily focus on improving the method for fetching oEmbed data from Twitter by switching from cURL to Guzzle HTTP client and adding error handling with retries.

Enhancements to oEmbed data fetching:

  • Added Guzzle HTTP client and related exceptions to handle HTTP requests.
  • Replaced the cURL implementation with Guzzle HTTP client in the getOembed method to improve reliability and maintainability.
  • Implemented retry logic in the getOembed method to handle intermittent 404 errors from Twitter, enhancing the robustness of the data fetching process.

@murdercode murdercode merged commit 8fb8ebb into main Dec 16, 2024
2 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant