SharePoint Twitter Formatting
I seem to have gotten the SharePoint View Formatting bug. You might have saw my post the other day where I used View Formatting to make list items look similar to a Planner Task Card: https://www.sharepointsiren.com/2019/08/planner-inspired-sharepoint-task-cards/
Today I had another inspiration for View Formatting when implementing a Flow for a client. They wanted to take Tweets with a certain hashtag, run them through Cognitive Services to judge the sentiment (negative or positive) and add the negative Tweets to a SharePoint list that they can monitor.
There are several handy Flow templates that you can use to do this. Check out this one if you want to get started: https://us.flow.microsoft.com/en-us/galleries/public/templates/12876fc4ac324346934cba44ea593620/record-a-tweets-sentiment-analysis-in-a-sharepoint-list/
I know you might be thinking that there’s already a Twitter web part for Modern SharePoint so why would you need this? Well with that, the only way you can filter that is by a certain hashtag or username. So in my scenario of using Flow and curating a SharePoint list of just negative tweets, it would be cool if we could use SharePoint View Formatting to make that list of Tweets look like Twitter.
With that in mind, I set out to make it happen. Here’s what I came up with:
Fairly similar right? There is a retweet icon which shows the number of retweets. Next to that is a share icon which will open up the Tweet in Twitter so you can reply, like, etc. If you click on the username it will take you to that user’s Twitter profile.
To see what’s required for the list set up and to download the JSON code go to the link below on my GitHub.
https://github.com/aprildunnam/SPJS/tree/master/SPTwitterFormat