I've been playing round to make this work in Razor on 4.8.1. I got a 400 error because TwitterOAuthDataValue was empty when calling GetLatestTweets, in my case DeserializeValue wasn't happy with the xml I passed so serialised it to json and it's working.
Just to quickly update, sorted the switch to XML but still unable to save the LatestTweets.xslt file. Also when I try to use the Latest Tweets within the template I still get Error in XSLT.
To use the Latest Tweets Macro (latestTweets.xslt), I had to tick XML in the Data Type because JSON was selected by default and was causing the 400 error. Have you authorised the app in the content section?
Cheers for that, just found it as you replied, even aftr setting up a twitter app I am still getting the same errors both when saving the LatestTweets.Xslt and/or including within the template.
Hi justin,
Sorry, would you be able to provide a step by step process of how to do this for a bck end newby!? :)
That looks to be the right process, are tweets displaying without you amending LatestTweets.XSLT?
Have you got tweets to display in the Twitter account you linked to in step 4, and have you got any privacy settings setup?
I got the Razor code posted by Justin above to work, so you could try that. Remember to change the homepage nodeid to whatever yours is, and switch to JSON in the Data Type.
In my case when I set up the app I originally used the auth keys in Umbraco (even though they were optional), this didn't work so I removed them and checked the twitter app settings again. From what I can tell I hadn't set all of the various sections within the twitter app itself and so it couldn't auth with Umbraco. You don't need to use any of them in Umbraco (as per the instructions) but Twitter does seem to like them being there...
Think I am well & truely lost. I know this should be simple too.
Beacause I cannot get the feed to work using the standard uTwit application info, I've set up a twitter application to get the Consumer Key & Consumer Key Secret. I've updated these in the data type then went to the content panel to authorize. After clicking on the Authorize app button (on api.twitter.com) it throws a remote server 500 internal server error when redirecting back to the calling application.
I now understand why I was getting a 500 error as I had not checked the relevant option in the twitter app settings to allow the app to be used to sign in.
After all this I still get an Error parsing XSLT file: \xslt\latestTweets.xslt instead of the feed.
I had to change a couple of bits in the XSLT and was still getting an error, to be honest I ticked to ignore errors and after a few minutes of setting the app up correctly (which it sounds like you have) it worked fine. It did seem to take a few minutes to work after setting it all up..
Brian - can you tell me, each time you look at the content section (where you authorize Twitter OAuth Data Type) do you see the already athorized account? Each time I go back in nothing is listed, just the authorize link, It looks as if nothing has been authorized & I need to do it again.
Yeah, thats just because it isn't working yet... When it works the connected twitter account is always displayed. You know when you set up your data type have you included the key and secret?? If so I would delete it as this is one of the items causing mine to not work! Then give it a couple of minutes and try authorising your app again in the node/page.
Can anyone shed any light on a possible solution - I've set everything up what looks like the correct way but still getting a Error parsing XSLT file: \xslt\latestTweets.xslt where I should see the twitter feed.
I've authorized the app several times but each time I return to the authorize property in the content there is nothing listed & have to re-authorize it.
400 bad request error on xslt save?
I am getting errors when trying to update the xslt for the alias of the oauth datatype. i am running on localhost? new install on 4.11.3 on sqlCE.
any thoughts?
oh, and it errors on front end too.. just generic xslt error.
no thoughts on this?
uninstall, reinstall... careful attention to install details... all better now ;)
I'm getting a 400 too, is it because XML support has been discontinued
I've been playing round to make this work in Razor on 4.8.1. I got a 400 error because TwitterOAuthDataValue was empty when calling GetLatestTweets, in my case DeserializeValue wasn't happy with the xml I passed so serialised it to json and it's working.
If you're using XSLT you need to switch the Data Format to XML in the Data Type otherwise you get this 400 error. Took me a while to spot :)
Hi Anthony, please could you elaborate on your solution above, which XSLT / Macro would I need to change and which line of code or setting?
Many thanks (a back end newby)
Just to quickly update, sorted the switch to XML but still unable to save the LatestTweets.xslt file. Also when I try to use the Latest Tweets within the template I still get Error in XSLT.
Any thoughts guys?
To use the Latest Tweets Macro (latestTweets.xslt), I had to tick XML in the Data Type because JSON was selected by default and was causing the 400 error.
Have you authorised the app in the content section?
Cheers
Tony
I couldn't get it working as XSLT, I ended up doing it in razor and json
Hi Anthony,
Cheers for that, just found it as you replied, even aftr setting up a twitter app I am still getting the same errors both when saving the LatestTweets.Xslt and/or including within the template.
Hi justin,
Sorry, would you be able to provide a step by step process of how to do this for a bck end newby!? :)
Check your Twitter OAuth property is called 'twitter' or amend LatestTweets.xslt to whatever it is:
<xsl:param name="twitterOAuthPropertyAlias" select="'twitter'" />
I think my xslt problem may have been not having the property named twitter, I'd called it uTwit.
Anyway, I took the MVC Partial View code and repurposed it for version 4.8 Razor. eg. for Latest Tweets:
or you could hardcode your OAuth details like below instead of getting them off a node
Hmm struggling here still guys!
This is the process I am using to install the package:
That looks to be the right process, are tweets displaying without you amending LatestTweets.XSLT?
Have you got tweets to display in the Twitter account you linked to in step 4, and have you got any privacy settings setup?
I got the Razor code posted by Justin above to work, so you could try that. Remember to change the homepage nodeid to whatever yours is, and switch to JSON in the Data Type.
I got the 400 when didn't pass the oauth stuff so passing null config to :
var tweets = uTwit.GetLatestTweets(config, numberOfTweetsToDisplay, includeReplies, includeRetweets);
Cheers for all of your help guys... For some bizarre reason it has just started working!
I'm not quite sure which line above to mark as the solution but firgure that all of the advice was tops.
Cheers again guys {phew} :)
Having some difficulty here too. All set up as it should be, process was
keep getting a 'Error parsing XSLT file: \xslt\latestTweets.xslt'
I've noticed that each time I go back to the proprty in the Content Section I need to authorize it again ie the twitter account isn't listed.
Am I doing something wrong?
Any help greatly appreciated.
In my case when I set up the app I originally used the auth keys in Umbraco (even though they were optional), this didn't work so I removed them and checked the twitter app settings again. From what I can tell I hadn't set all of the various sections within the twitter app itself and so it couldn't auth with Umbraco. You don't need to use any of them in Umbraco (as per the instructions) but Twitter does seem to like them being there...
Vague I know, but it sorted my issues out :)
Think I am well & truely lost. I know this should be simple too.
Beacause I cannot get the feed to work using the standard uTwit application info, I've set up a twitter application to get the Consumer Key & Consumer Key Secret. I've updated these in the data type then went to the content panel to authorize. After clicking on the Authorize app button (on api.twitter.com) it throws a remote server 500 internal server error when redirecting back to the calling application.
I now understand why I was getting a 500 error as I had not checked the relevant option in the twitter app settings to allow the app to be used to sign in.
After all this I still get an Error parsing XSLT file: \xslt\latestTweets.xslt instead of the feed.
Is ther anything I have missed?
I had to change a couple of bits in the XSLT and was still getting an error, to be honest I ticked to ignore errors and after a few minutes of setting the app up correctly (which it sounds like you have) it worked fine. It did seem to take a few minutes to work after setting it all up..
Thanks for your help Brian.
I'm going to look at it all from scratch to see if I can pinpoint where I have gone wrong.
Cheers
No worries, it is a bit of a bugger if it doesn't go right the first time! It took me 3 attempts to suss out the various bits and correct order!
It works great once it does work though!!
Brian - can you tell me, each time you look at the content section (where you authorize Twitter OAuth Data Type) do you see the already athorized account? Each time I go back in nothing is listed, just the authorize link, It looks as if nothing has been authorized & I need to do it again.
Cheers
Yeah, thats just because it isn't working yet... When it works the connected twitter account is always displayed. You know when you set up your data type have you included the key and secret?? If so I would delete it as this is one of the items causing mine to not work! Then give it a couple of minutes and try authorising your app again in the node/page.
Can anyone shed any light on a possible solution - I've set everything up what looks like the correct way but still getting a Error parsing XSLT file: \xslt\latestTweets.xslt where I should see the twitter feed.
I've authorized the app several times but each time I return to the authorize property in the content there is nothing listed & have to re-authorize it.
Any help greatly appreciated.
I've solved it he says rather sheepishly!
I had not saved & published the home page after authorizing the twitter account - what an idiot I am.
Thanks for all your help though guys
is working on a reply...