Hello,

I would like to use Twitter for commenting on individual tiddlers. The idea 
is that each tiddler has a Tweet button that's pre-populated with hashtags 
of the wiki name and the tiddler's name, and then uses Twitter's embedded 
search to show tweets tagged with that tiddler, preferably hiding it if 
there aren't any.

This is what I have right now. Obviously, it would be better for this to 
dynamically get the wiki name and URL, but I don't know how to do that.

\define post_comment(name) 
<a href="https://twitter.com/share"; class="twitter-share-button" 
data-url="http://nomadical.tiddlyspot.com/#$name$"; data-hashtags="$name$, 
nomadicaltw"  data-dnt="true" data-show-count="false">comment w 
twitter</a><script async src="//platform.twitter.com/widgets.js" 
charset="utf-8"></script>
\end

\define view_comments(name)         
<a class="twitter-timeline" data-dnt="true" 
href="https://twitter.com/search?q=%23nomadicaltw%20%23$name$"; 
data-widget-id="832444815946182657">comments</a><script>!function(d,s,id){var 
js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+"://platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
\end
          

<$macrocall $name="post_comment" name=<<currentTiddler>>/>
<$macrocall $name="view_comments" name=<<currentTiddler>>/>

However, this doesn't work, because embedded JS is disallowed. It seems 
like I should make a plugin for this, but doing so is dizzying complicated 
for a newbie. (Indeed, a lot of the technical choices become immensely 
frustrating as soon as you go a little bit past the use-case). For a while, 
I was hoping to use a previous version of TiddlyWiki where embedded 
javascript seems to be allowed, but then the saving functions don't seem to 
work with TiddlySpot...
 
Could anyone help me with this?

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/78a72c00-1bb8-4524-b953-2ec31e4d45c6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to