Get image and height for Twitter images #2345
Ticket(s) / Related Merge Requests
- DOES NOT CLOSE #2345 (closed) - Card should be moved out on merge.
Summary of Changes
As we cannot yet get Twitter Videos until they release the video links to the V2 API - this change is different to the original issue card, and seeks to:
- Set dimensions on Twitter images
- Strip the media URL from the text of Twitter videos.
- Improve how media metadata is handled to ease the transition to native videos when we can directly grab them.
Testing Considerations
**REQUIRES K8S CLUSTER ACCESS **
-
Make a new Twitter account or use an existing one you don't mind spamming with posts.
-
Go to
/settings/other/twitter-sync
. -
Follow the flow to set up Twitter sync.
-
None of the above is within scope of these changes - any issues, DM me and I will help you get set up.
-
On Twitter, make:
- Rich embed.
- Rich embed with text.
- Text post.
- Text post with emojis.
- Image post.
- Image post with text.
- Video post. CHOOSE A SMALL SIZED VIDEO.
- Video post with text. CHOOSE A SMALL SIZED VIDEO.
- Wait a couple of minutes to ensure Twitter has indexed everything properly
- exec into the pod, and run the sync command by CLI
kubectl exec -it feat-twitter-sync-dims-2345-minds-engine-sandbox-7d9b4b8f4zc2p2 sh
cd engine
php cli.php TwitterSync sync
- Check posts were mirrored to your channel. ORDER OF POSTS IS NOT ANYTHING TO DO WITH THIS CHANGE.
- Videos should not have the URL in the post message.
- Going to an images single entity page, and looking for the call to
api/v2/entities
on load, you should see width and height was saved.
Deployment Considerations
Needs to go to the runner responsible for TwitterSync.
Regression Scope
Effects TwitterSync
Platform Affected (web, mobile, etc
TwitterSync runner
Developer Testing Completed
Manual and unit
Screenshots / Screen Recording
Does this impact
-
Localization -
Dark/light mode -
Guest mode
Definition of Done Checklist
-
The Acceptance Criteria has been met -
Code is tested: Testing includes unit/spec, E2E/automated and manual testing -
Merge requests description has been filled out
Edited by Ben