Skip to content

feat: Twitter Button Cookie Integration#1026

Merged
JuanPabloDiaz merged 1 commit intotech-conferences:mainfrom
JuanPabloDiaz:feat/twitter-cookie-integration
Jul 9, 2025
Merged

feat: Twitter Button Cookie Integration#1026
JuanPabloDiaz merged 1 commit intotech-conferences:mainfrom
JuanPabloDiaz:feat/twitter-cookie-integration

Conversation

@JuanPabloDiaz
Copy link
Contributor

Twitter Button Cookie Integration

This PR ensures the Twitter follow button respects user cookie preferences.

  • Check cookie consent before loading Twitter widgets
  • Display simple follow link if consent is not given
  • Add data-cookieconsent='ignore' attribute for cookie banner compatibility
  • Prevent automatic Twitter widget loading when user declines cookies

Breaking down #1021


This pull request updates the TwitterFollowButton component to respect user cookie consent preferences and improve privacy compliance. The changes introduce a mechanism to check for cookie consent before loading Twitter widgets and provide an alternative follow link when consent is not given.

Privacy compliance and cookie consent:

  • src/components/TwitterFollowButton/TwitterFollowButton.tsx: Added a useState hook to manage cookie consent (hasConsent) and updated the useEffect hook to check localStorage for user consent before loading Twitter widgets. If consent is not given, a simple follow link is displayed instead of the embedded widget. [1] [2]

Enhancements to Twitter widget attributes:

- Check cookie consent before loading Twitter widgets
- Display simple follow link if consent is not given
- Add data-cookieconsent='ignore' attribute for cookie banner compatibility
- Prevent automatic Twitter widget loading when user declines cookies
@JuanPabloDiaz JuanPabloDiaz changed the title feat: respect user cookie preferences in Twitter follow button feat: Twitter Button Cookie Integration Jul 8, 2025
@JuanPabloDiaz JuanPabloDiaz merged commit 7a45650 into tech-conferences:main Jul 9, 2025
4 checks passed
@JuanPabloDiaz JuanPabloDiaz deleted the feat/twitter-cookie-integration branch July 9, 2025 01:04
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