Twitter API deprication breaking latest posts list
Hi everyone,
I am new to the Umbraco forum and was wondering if anybody could help me. Since Twitter depricated the 'API v1.0. Retirement of Basic Auth support' a number of our websites have stopped displaying the latest Twitter posts. I get the message 'Problem connecting to Twitter for data'. We have used uTwit for our newer websites but we still have a number of websites using Umbraco versions not compatible with uTwit namely <4.5
Can anybody suggest an XSLT solution to display the lastest Twitter posts using the new API?
Thanks for getting back to me. I will take a look and see if we can use your code to fix the oAuth authentication issue. My colleague Ismail Mayat is also looking into maybe using the uTwit source code and modifiying it to work with .net 2.0 so I will keep you posted on this!
Something else to bear in mind with Twitter, is it's down or slow a lot. So loading timelines server side can slow things down on the site.
The simplest way to get around that is call the Twitter timeline code from a web service or WCF service (web service is easier) and consume that from client side javascript. This way, hits on Twitter are done after the rest of the page has loaded so there's no performance hit.
I haven't used uTwit, but if it handles that issue it's probably a better option for you.
@dan The profile manager (use Twitter image) is broke too. I tried to fix on GitHub but found they don't do anon request anymore. I'm gonna use your oAuth code one day.
Im using your oauth code keep getting 401 un authorised. The oauth header looks fine have definately checked correct values are being passed through. One thing to note I have made a few modifictions to the code so its compiling out as .net2 dll and for the moment im returning in get time line a string eventually will load into XmlDocument then return back xpath iterator. I am basically creating dll that i can use with xslt extensions of older umbraco versions that we cannot upgrade.
Twitter API deprication breaking latest posts list
Hi everyone,
I am new to the Umbraco forum and was wondering if anybody could help me. Since Twitter depricated the 'API v1.0. Retirement of Basic Auth support' a number of our websites have stopped displaying the latest Twitter posts. I get the message 'Problem connecting to Twitter for data'. We have used uTwit for our newer websites but we still have a number of websites using Umbraco versions not compatible with uTwit namely <4.5
Can anybody suggest an XSLT solution to display the lastest Twitter posts using the new API?
Thanks for your help!
Chris
Hi Chris,
I made a class to handle OAuth authentication and grabbing Twitter timelines with the 1.1 API.
Maybe it is useful to you. There is an example project to demonstrate how to use it in code.
https://github.com/OptimisticCoder/TwitterAPI
I hope that helps.
Dan
Hi Dan,
Thanks for getting back to me. I will take a look and see if we can use your code to fix the oAuth authentication issue. My colleague Ismail Mayat is also looking into maybe using the uTwit source code and modifiying it to work with .net 2.0 so I will keep you posted on this!
Chris
Awesome! Good luck!
Something else to bear in mind with Twitter, is it's down or slow a lot. So loading timelines server side can slow things down on the site.
The simplest way to get around that is call the Twitter timeline code from a web service or WCF service (web service is easier) and consume that from client side javascript. This way, hits on Twitter are done after the rest of the page has loaded so there's no performance hit.
I haven't used uTwit, but if it handles that issue it's probably a better option for you.
Dan
Comment author was deleted
@dan The profile manager (use Twitter image) is broke too. I tried to fix on GitHub but found they don't do anon request anymore. I'm gonna use your oAuth code one day.
Dan,
Im using your oauth code keep getting 401 un authorised. The oauth header looks fine have definately checked correct values are being passed through. One thing to note I have made a few modifictions to the code so its compiling out as .net2 dll and for the moment im returning in get time line a string eventually will load into XmlDocument then return back xpath iterator. I am basically creating dll that i can use with xslt extensions of older umbraco versions that we cannot upgrade.
Any ideas?
Many thanks
Ismail
Dan,
Found another article on code project using code from that and that works. Also i had to go back to json as xml is no longer supported.
Hi Ismail,
I've just used the class for a client, and I found the constructor arguments are the wrong way round in the example.
If you use what intellisense tells you it should work fine.
I'll get the repo updated now oops.
The class is dependent on Newtonsoft.Json to deserialize into objects.
Give me a shout if you are still using it and having problems.
Dan
The repo is updated and tested in GitHub now.
You just need to change line 24
and line 36
of the example, and the console will give you a bunch of tweets.
https://github.com/OptimisticCoder/TwitterAPI
I got a bit carried away and added a web service and made it into a package.
https://github.com/OptimisticCoder/TwitterAPI/tree/master/Umbraco%20Package
Hopefully that makes things easier :D
Thanks for all of your help Dan! We will give your package a try!
Chris
is working on a reply...