Results 1 to 6 of 6

Thread: News Twitter

  1. #1
    User
    Join Date
    06-19-09.
    Location
    Elbl?g, Poland
    Posts
    152

    Default News Twitter

    Hi,

    It's very useful module but I noticed some strange behavior in my Twitter status generated by "News Twitter" module there are some strange numbers.

    For example:
    sending status from typolight


    status on Twitter


    and status on Twitter on other account send from different typolight instalation than first one


    In both cases there are 12 and 0 which enclose link. I did't write these numbers at all. Today I updated News Twitter module via ER but for now I didn't send to Twitter anything so I don't know is new version fix this problem?

    Regards
    Marcin

    http://www.contao.pl - Polish Support Site
    http://forum.contao.pl - Polish Contao community forum


    -----------------------
    Need custom template? Feel free to contact me by e-mail marcin@contao.pl

  2. #2
    User
    Join Date
    06-20-09.
    Location
    Middlesbrough, UK
    Posts
    246

    Default Re: News Twitter

    Is this thread for all News twitter module support?

    If so can I make a feature request? Can this module extend to include events so the events section can update twitter every time a new event is added?

    Love this new way to incorporate social media through Typolight. Great work.
    360fusion: Virtual Tours - Web Design
    Social Media: Twitter - Facebook Page

  3. #3
    User taca's Avatar
    Join Date
    06-20-09.
    Location
    Kyoto, Japan
    Posts
    111

    Default Re: News Twitter

    Hi,

    I have recently found News Twitter extension's bug when set "Twitter status" to "scheduled" and
    enable "Include news link" check.

    A link to news item is created but it points cron.php.

    Here is a simple patch to fix it.

    Code:
    --- system/modules/newstwitter/NewsTwitter.php.orig	2010-07-11 09:57:57.000000000 +0900
    +++ system/modules/newstwitter/NewsTwitter.php	2010-07-11 13:28:38.000000000 +0900
    @@ -60,7 +60,7 @@
     	{
     		$this->import('Database');
     		
    -		$objNews = $this->Database->prepare("SELECT tl_news.*, tl_news_archive.twitterAuth FROM tl_news LEFT OUTER JOIN tl_news_archive ON tl_news.pid=tl_news_archive.id WHERE tl_news_archive.twitter='1' AND tl_news.twitter='1' AND twitterStatus='cron' AND published='1'")->limit(1)->execute($dc->id);
    +		$objNews = $this->Database->prepare("SELECT tl_news.*, tl_news_archive.twitterAuth, tl_news_archive.jumpTo AS parentJumpTo FROM tl_news LEFT OUTER JOIN tl_news_archive ON tl_news.pid=tl_news_archive.id WHERE tl_news_archive.twitter='1' AND tl_news.twitter='1' AND twitterStatus='cron' AND published='1'")->limit(1)->execute($dc->id);
     		
     		if (!$objNews->numRows)
     			return;
    @@ -109,7 +109,7 @@
         	    $strUrl = $this->shortUrl($strUrl);
     		}
     		
    -        $strData = 'source=typolight&status=' . urlencode($strStatus . ' ' . $strUrl);
    +        $strData = 'source=contao&status=' . urlencode($strStatus . ' ' . $strUrl);
             
             $objRequest = new Request();
             $objRequest->setHeader('Authorization', 'Basic {' . $strAuth . '}');
    --
    Takahiro Kambe

  4. #4
    User taca's Avatar
    Join Date
    06-20-09.
    Location
    Kyoto, Japan
    Posts
    111

    Default Re: News Twitter

    I found another potential problem about News Twitter.

    News Twitter uses Basic Authentication for posting to Twitter. AFAIK, Twitter recommends OAuth protocol instead of Basic Authentication and it was planed and postponed that stop supporting Basic Authentication.

    So, News Twitter needs to be updated to support OAuth protocol. (There is php-oauth extension in pecl.)

    Best reagrds.
    --
    Takahiro Kambe

  5. #5
    User taca's Avatar
    Join Date
    06-20-09.
    Location
    Kyoto, Japan
    Posts
    111

    Default Re: News Twitter

    The dead line of using Basic Authentication is 16th Aug. Yes, it is a little time...


    According to Twitter's announce, Basic Authentication will stop completely 30th Aug.
    --
    Takahiro Kambe

  6. #6
    User taca's Avatar
    Join Date
    06-20-09.
    Location
    Kyoto, Japan
    Posts
    111

    Default Re: News Twitter

    Hi,

    Quote Originally Posted by Ben_360fusion
    If so can I make a feature request? Can this module extend to include events so the events section can update twitter every time a new event is added?
    Here is my idea.

    1. Create its own table like system log.[/*:m:1f1o1kqa]
    2. When creating a new New (or Event) item, add a record of tweet text to the table.[/*:m:1f1o1kqa]
    3. Scheduler from cron.php scan the table and check if the associated News or Event item is published. If so, tweet the recorded text to Twitter.[/*:m:1f1o1kqa]


    In this way, anyone could add text to tweet. And make tweeting function pluggable, it could post to facebook, too.

    It is very rough idea and I don't have enough knowlege to implement or time.
    --
    Takahiro Kambe

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •