This project is read-only.

Twitter Feed Not Working

Topics: Business Logic Layer
Nov 25, 2011 at 12:26 PM

Hi, I am using a twitter feed on site but the widget is not showing the tweets.

The twitter_feeds.xml file contains the correct tweets, implying that the widget settings are correct and network service user has full control permissions for the file. But the tweets are not showing in the widget.

Does anyone know why this might be?

Jan 3, 2012 at 7:48 PM

The reason was that the widget is designed to ignore tweets which contain the "@" character.

A bit silly as most tweets do contain that character as twitter usernames contain it and tweets often mention other twitter users.

The code makes any links in the tweets into html links using a regex and whoever coded this slightly lazily chose to ignore tweets containing "@", rather than handling them in the code.

I fixed it (a bit lazily myself) by doing a string.replace of any "@" with "xxx" then do the regex link resolution, then before displaying the tweet string.replace the "xxx" with "@".