Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Hello all. I have read the other topic (http://our.umbraco.org/projects/website-utilities/twitter-for-umbraco/help/10937-Tweets-not-displaying-) but my problem seems to have a different cause.
I'm running Umbraco 4.0.3 with Twitter for Umbraco 1.6 which I installed from the online repository.
I followed the same debugging process as in the other topic and tried Warren's suggestion of adding...
<textarea> <xsl:copy-of select="umbraco.library:GetXmlDocumentByUrl($twitterXMLUrl)" /></textarea>
which showed me the following error message:
<error url="http://twitter.com/statuses/user_timeline.xml?screen_name=adlsmartcare&include_rts=1&count=200">System.Net.WebException: The remote server returned an error: (400) Bad Request. at System.Net.HttpWebRequest.GetResponse() at umbraco.library.GetXmlDocumentByUrl(String Url)</error>
<error url="http://twitter.com/statuses/user_timeline.xml?screen_name=adlsmartcare">System.Net.WebException:The remote server returned an error: (400) Bad Request. at System.Net.HttpWebRequest.GetResponse() at umbraco.library.GetXmlDocumentByUrl(String Url)</error>
Could there be something wrong with /bin/CWS.Twitter4Umbraco.XSLTExtensions.dll or my core Umbraco installation? Has anyone else encountered this problem?
Hello Richard,I am not an ASP.NET expert but I think it may be down to something with the site on your webserver.
Is your site running locally on your machine on a webserver currently?
I think it is something along the line that it can not connect to the URLhttp://twitter.com/statuses/user_timeline.xml?screen_name=adlsmartcare&include_rts=1&count=200">http://twitter.com/statuses/user_timeline.xml?screen_name=adlsmartcare&include_rts=1&count=200
The twitter API does not seem to be having a problem as I can see the list of tweets from the URL.
Let me know re your umbraco site setup please.
Hello Richard,Do you have Remote Desktop Access to the server?
If so can you open a web browser on the server and confirm you can connect to either of these URLs
Hi Richard,OK so they may have some kind of external nternet connection from their web server possibly
I had a similar issue with a outbound request to a 3d party web service. I'd start by checking that you have all the correct user credentials for the request.
Hello Richard you are free to modify the XSLT to work like this if you wish, but I don't recommend it and I won't be able to help you if you customise it to work this way.
However I think you misunderstand what the variable noStatus is for. As I don't understand why you would set it to 0? Why would you include a twitter macro in your template to show no tweets. Can you tell me why you have set it to 0 and not a value like 5, 10, or 1 ?
Also you should not modify the XSLT directly especially the variables really, as they get the values from the macro parameters. For example when you use the macro in your template noStatus gets it value from the noStatus macro parameter. So in the example below it grabs the number 30
<umbraco:Macro twitterUsername="adlsmartcare" noStatus="30" displayReplies="1" displayNativeRTs="1" displayMaps="1" zoom="15" size="400x400" mapType="roadmap" Alias="CWS_twitter" runat="server"></umbraco:Macro>
But you should not need to modify the XSLT, unless you want to modify the markup like my documentation on my our.umbraco.org project page states.http://our.umbraco.org/projects/website-utilities/twitter-for-umbraco
So I recommend you reset the XSLT back to the way it was when the package was installed and set the value of noStatus via the macro parameter to a positive number.
Let me know how you get on,Warren :)
this doesn't look like a permissions issue from that.. but more a format of the return value.
<xsl:template match="status" mode="tweet">
This may be an issue with multiple return values rather than a single value
mode=tweet implies a single result, whereas mode = array is multiple tweets
I personally still don't understand why it is causing the problem? Did you try my suggestion of creating a NEW xslt file and using the umbraco.library:GetXMLDocumentByURL() call?
I would like to know what the outcome is please, when you try the example in this WIKI page to grab items from BBC News:http://our.umbraco.org/wiki/reference/umbracolibrary/getxmldocumentbyurl
since you have literally reimplemented the install can you have you tried the standard implementation as suggested by Warren, and can you let us know what the result of that is.
The XSLTExtensions config file should something like this
Before version 4.5.X
<?xml version="1.0" encoding="utf-8"?><XsltExtensions> <ext assembly="/bin/CWS.Twitter4Umbraco.XSLTExtensions" type="CWS.Twitter4Umbraco.XSLTExtensions" alias="CWS.Twitter"> </ext></XsltExtensions>
Version 4.5.X and newer
<?xml version="1.0" encoding="utf-8"?><XsltExtensions> <ext assembly="CWS.Twitter4Umbraco.XSLTExtensions" type="CWS.Twitter4Umbraco.XSLTExtensions" alias="CWS.Twitter"> </ext></XsltExtensions>
But please can you answer my question in regards to the example BBC News GetXMLDocumentByUrl()http://our.umbraco.org/wiki/reference/umbracolibrary/getxmldocumentbyurl
Hey Richard,OK that helps us know there is no problem with the GetXMLDocumentByUrl() call.
What was your findings in regards to the XSLTExtensions config ?
Can you copy and paste the macro you have used in the template, so I can see all the properties you have used please.
In addition to this update the XSLT for me to include this useful debugging please:
Below this line
<!-- Twitter XML URL -->
<xsl:variable name="twitterXMLUrl" select="concat(' http://api.twitter.com/1/statuses/user_timeline.xml?screen_name=', $twitterUsername ,'&include_rts=', $displayNativeRTs ,'&count=200')"/>
Add this piece of code:
<xsl:variable name="remoteXML" select="umbraco.library:GetXmlDocumentByUrl($twitterXMLUrl)" /><textarea> <xsl:copy-of select="$remoteXML" /></textarea>
This in theory should output the XML from the remote URL such as thishttp://api.twitter.com/1/statuses/user_timeline.xml?include_rts=true&count=200&screen_name=warrenbuckley
Seems like some of the problems you are having is to do with permission problems, as the package should automatically update this file on install and uninstall for you.
I can't read half the replies in this thread but for anyone else with this prob, replace your amperands in the twitter URL like this:
<xsl:variable name="twitterXMLUrl" select="concat('http://api.twitter.com/1/statuses/user_timeline.xml?screen_name=', $twitterUsername , $and, 'include_rts=', $displayNativeRTs, $and ,'count=15')"/>
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted