wet-boew / GCWeb

Canada.ca theme - A reference implementation of the Canada.ca Content and Information Architecture Specification, the Canada.ca Content Style Guide and the Canada.ca Design System
https://wet-boew.github.io/GCWeb/
Other
92 stars 130 forks source link

Twitter Embedded Search Timeline widget no longer works #1400

Open dmiddleditch opened 6 years ago

dmiddleditch commented 6 years ago

Twitter updated their API eliminating the ability to generate a social media feeds widget using publish.twitter.com using a search against #.

It appears that new code would be need to be rewritten leveraging the api directly to enable this functionality, as publish.twitter.com only supports @names, collections etc https://twittercommunity.com/t/deprecating-widget-settings/102295.

It appears broken in WET https://wet-boew.github.io/v4.0-ci/demos/twitter/twitter-en.html

and in the promotional event template http://wet-boew.github.io/themes-dist/GCWeb/event-en.html

and is listed as a mandatory item in the promotional event IA specification https://www.canada.ca/en/treasury-board-secretariat/services/government-communications/canada-content-information-architecture-specification/templates-detailed-specifications/promotional-events-pages.html

duboisp commented 6 years ago

@dmiddleditch are you available to write a fix for it?

ghost commented 6 years ago

I can see a issue for WET with using the API.

See: -https://developer.twitter.com/en/docs/basics/authentication/guides/authorizing-a-request.html -https://developer.twitter.com/en/docs/tweets/search/api-reference/get-search-tweets.html

Issues being is the key generation for authorizing the request.

dmiddleditch commented 6 years ago

@duboisp sorry that's not my area, I just wanted to flag the issue as it's referred to in the IA spec. I have somebody on our dev team investigating it further, and we can share if found but it's not a priority task for his team. To @thekodester's point tough to demo that for the api using an individual's key although feasible at the department level. Now that he mentioned it though, I do wonder about the api call limits https://developer.twitter.com/en/docs/basics/rate-limits.html

ghost commented 6 years ago

Didn't even see rate limits in my quick search. Only reason I knew about the key issue was I worked on the twitter page before (long ago).

The keys are really meant to be used by a single person/company. As you have to request it with an Twitter account.

I think what would have to be done is rewrite the twitter pages explain the non-api approach and the api approach, but only provided an example of the non-api.

The downside to this is WET well lose hashtag searches, but if someone really needs it at a department level they need to setup an API twitter.

Bgolden67 commented 5 years ago

Has there been any progress on resolving the WET twitter feed issues?

ghost commented 5 years ago

The guide page was updated to show what is now available from the free embeddable twitter tools.

The other request cannot be made as you have to have an API key which requires using a twitter account to create that API key. So if someone wants a more advance twitter feed than what open for free they have to create it them selfs currently.

See twitter took the approach where certain API calls now have limits if you go over that limit you pay a fee or suffer slow downs in you twitter request.

You can see the fix over in the main repo: https://github.com/wet-boew/wet-boew/pull/8555.