Jump to:

10989 Posts in 2726 Topics by 1817 members

All other Modules

SilverStripe Forums » All other Modules » Twitter module - now available to download

Discuss all other Modules here.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1 2 3 4
Go to End
Author Topic: 5681 Views
  • michaelhmm
    Avatar
    Community Member
    23 Posts

    Re: Twitter module - now available to download Link to this post

    Decided to post the running code I have - you can see it in action here:

    http://www.makingwaves.org/farthingpenny/

    The SilverStripe static method raw2xml:

    Convert::raw2xml($string);

    is what does the trick on the parts of the feed that have been UTF-8 decoded in the original TwitterAPI class.

    Since SilverStripe uses UTF-8 encoding I am not sure why the class uses the php UTF-8 decoding function?

    Attached Files
  • Nivanka
    Avatar
    Community Member
    395 Posts

    Re: Twitter module - now available to download Link to this post

    hi all, Sorry for this delay to answer, I didnt notice this thread, must be mistakenly ticked off the Subscribe check box, I will answer these soon.

    michaelhmm Many thanks for contacting me on twitter. So I will review the code, i see it needs some refactoring as well.

    Give me a day or two over the weekend i will have some time for this for sure.

  • Nivanka
    Avatar
    Community Member
    395 Posts

    Re: Twitter module - now available to download Link to this post

    check with this code, I did some new updates to the look and feel too.

    Attached Files
  • michaelhmm
    Avatar
    Community Member
    23 Posts

    Re: Twitter module - now available to download Link to this post

    Hi

    Just noticed that the code in the twitterAPI is using:

    Convert::xml2raw

    which doesn't work (won't convert special characters like & to html entities so breaks rendering of a strict xml document ) it should be:

    Convert::raw2xml

    Michael

  • michaelhmm
    Avatar
    Community Member
    23 Posts

    Re: Twitter module - now available to download Link to this post

    Social Logic Error!

    The page template twitterPage.ss will print the message that you have "0 Friends" if you specify that you want no freinds to show in the twitter form within the content management system.

    The message is not necessarily true since you may have many friends but not wish to show them.

    It is also just not nice to be told you have no friends, especially by a computer never mind by a human!

  • michaelhmm
    Avatar
    Community Member
    23 Posts

    Re: Twitter module - now available to download Link to this post

    Complexity: Convert:raw2xml is sometimes run twice on the same feed string when it's placed into the working SilverStripe framework as part of the twitter module. So for example the special character:

    &

    is double converted to:

    &

    It doesn't do this in isolation in tests so there is something in the flow of object processing which is causing this anomaly. Any ideas why this might be occuring?

  • jovoo
    Avatar
    Community Member
    12 Posts

    Re: Twitter module - now available to download Link to this post

    Does anyone use this module in ss 2.4? Seems that I don't get any data from my twitter-account... e.g. "0 Followers" Not sure yet what's wrong.

  • Hamish
    Avatar
    Community Member
    712 Posts

    Re: Twitter module - now available to download Link to this post

    BTW, Twitter is turning off basic auth in 7 weeks. I don't believe this module has made the switch, so either Nivanka or someone else needs to add OAuth for this to continue working.

    See: http://countdowntooauth.com/

    5681 Views
Page: 1 2 3 4
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.