user-pic

Twitter Feed User and Hashtag Links

Vote 0 Votes

Using the default Twitter action stream formatting, @usernames and #hashtags are automatically linked to Twitter. If I replicate the default Twitter recipe by using this code:


<mt:AuthorDisplayName escape="html"> <a href="<mt:StreamActionURL escape="html">">tweeted</a>, "<$mt:StreamActionTitle$>"

the usernames and hashtags are not linked. I can't see in the streams.yaml or services.yaml files how the linking happens in the default recipe when simply using the <mt:StreamAction> tag.

How do I get the linking when using my own code?

Reported on Movable Type 4.2

4 Replies

| Add a Reply
  • I was about to type that it's done using callbacks, but there is a lot more to it than that!

    have a look at config.yaml, lib/actionstreams/event.pm, lib/actionstreams/fix.pm, lib/actionstreams/event/twitter*.pm

    You can follow the path of a tweet, but it's hard to explain here!

  • I'm not a programmer, so I'm not sure I'd e able to follow. I did check the config.yaml file and saw some Twitter refferences in there, but couldn't make sense of it.

    So, essentially, you're saying that it's coded into Action Streams? If I want to roll my own formatting (I simply want to put in a line break between '[user] tweeted' and the body of the tweet.), I'll have to loose the @username and #hashtag formatting? The magic that's built into the plugin only works if you're using the default recipe?

    That's real unfortunate.

  • OK, I looked through those files and I (sorta) see that there is some magic happening in there. I have no idea how any of it works, but there it is.

    But I don't get why the magic only works if you use the default recipe and not with your own templating.

    The real question is can I get this with my alternate templating or would that be a big deal?

  • I can't say this will solve your problem, but there is a good bit of help in this page. I used it to create some fancy-shamncy Action Stream recipes.

    http://www.movabletype.org/documentation/motion/actionstreams/recipe-developer-guide.html

Add a Reply

If you need to share template code, replace all the "<" signs with "&lt;" or use this utility.

Forum Groups

1773 6162

Last Topic: Excluding categories from blog by kholechek on Feb 9, 2012

86 302

Last Topic: website entries by masoud on Oct 26, 2011

1429 5077

Last Topic: What apocalypse hit this community in the middle of 2011? by 75th on Feb 10, 2012

695 2910

Last Topic: Insert Image / File Fails by Russ Miller on Feb 10, 2012

84 291

Last Topic: How to have some other characters in entry basename automatically written by Afshin Haghighatnia on Dec 22, 2011

173 737

Last Topic: About the MT version stated in HTML source by Alex E. Schneider on Feb 7, 2012

190 567

Last Topic: Analytics Reporting by michael webster on Feb 5, 2012

48 210

Last Topic: An idea and also a request by Afshin Haghighatnia on Jun 29, 2011

64 246

Last Topic: jQuery in MT 5.1 still at 1.4 - why? by perlmonkey on May 25, 2011

code.sixapart.com

137 478

Last Topic: Getting a thumbnail with xpath by Peter on Mar 13, 2011

222 720

Last Topic: Custom Field for Asset Not Appearing by android on Feb 9, 2012