0

Limiting number of twitter entries displayed by customizing autorun script

Note: This functionality is included in BrightAuthor 3.8 and newer.  No editing of the autorun is necessary.

You can  modify the autorun , used by BrightAuthor, to limit the number of tweets displayed. When you publish a project, it puts an autorun.brs file on the sd card. You can modify it, and save a copy on your computer. You can then add this modified autorun to your brightauthor project, before you publish it. In the example below, I'm exiting the loop that displays feeds after one time through, so only the latest tweet would be displayed. 

Search in the autorun.brs file on the sd card for this function:

Sub PopulateRSSDataFeedWidget()


1. Before this line:
for each rssDataFeedItem in m.stateMachine.rssDataFeedItems

Add this: tcount=0


Result would be:
tcount=0
for each rssDataFeedItem in m.stateMachine.rssDataFeedItems

 

2. Inside of this for loop, which is a few lines later:

for each article in rssDataFeedItem.liveDataFeed.articles
m.stateMachine.widget.PushString(article)
next


Make the following change:


for each article in rssDataFeedItem.liveDataFeed.articles
m.stateMachine.widget.PushString(article)

'custom twitter limit
tcount=tcount+1
if tcount=1 exit for
next

5 comments

  • 0
    Avatar
    JRB Technical

    It would be nice if the number of tweets displayed could be added in to future versions of BrightAuthor, so the value could be set  or modified in BA, instead of having to modify the autorun.brs file.

    Thanks!

  • 0
    Avatar
    Monica Knutson

    Is this still applicable to the BrightAuthor 3.7 update?

  • 0
    Avatar
    eric yanez

    Hi,

    I already made this change in the autorun, but it is still read all my tweets.

    I´m using BrightAuthor 3.7

    Regards

  • 0
    Avatar
    Lyndon

     

    The example above has been fixed. THe changes were accurate, but were made to the wrong for statement in the original example. This now works. 

  • 0
    Avatar
    Brandon

    This functionality is built into BrightAuthor 3.8 and newer.

Please sign in to leave a comment.