New Sitefinity Twitter Feed\Widget\Service

December 19, 2018
Sitefinity officially depreciated the original native twitter feed widget in 11.1, along with all the old social buttons. So this isn't a BAD thing since the original widget never really returned proper twitter markup. The content was fed into sitefinity though a "pipe" (think SF background service) and exposed locally as a feed.  The content however was stored as plain text, almost zero of the tons of metadata associated with a tweet came though. 

"Key": "Content",
"Value": "#ForSale: #Wilburn Street, #Salford | £261,000\n \nThis property is an ideal for either owner occupiers or investors…"

So this tweet content contains a bunch of hashtags and a link, none of it is parsed or html so you have to do this yourself or hope no user wants to interact with it.

Okay, so I rebuilt it :)

This time it's based on a TweetSharp fork and you get ALL the data right from twitter.  Not only that but the feed types (yes, types, @mentions, user timeline, single tweet, home timeline) are all exposed through CACHED (configurable) ServiceStack routes.  So you can use my cshtml widgets or you can just work with the service API layer directly with XHR GET requests.

Results are cached globally based on a setting in the backend advanced settings /Sitefinity/Administration/Settings/Advanced/SitefinitySteveMvc.
This matters because twitter imposes a limit on api calls.  So if you have 100 requests a second to your site, thats 100 calls to twitter a second, the API would shut you down fast.  With cache, you're only hitting it once in that cache period, which also means you don't incur any callback latency penalties to the twitter api.

TweetSharp references Newtonsoft.Json v11 You will probably need to REVERSE assemblybind sitefinity to use the included v10 (as of 11.1).

        <assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
        <bindingRedirect oldVersion="" newVersion="" />

Go get it now

Image Description

Steve McNiven-Scott

Best\Only Blogger on this site. Therefore defacto blogger of the year Award Winner.