[TW5] Tweet This or Pin That - Social Buttons

85 views
Skip to first unread message

RichShumaker

unread,
Dec 4, 2014, 11:23:52 PM12/4/14
to tiddl...@googlegroups.com
Has anyone incorporated Tweet or Pins to their TW5 to allow individual tiddlers to be shared?

Thanks again everyone.

Rich Shumaker
Message has been deleted

RichShumaker

unread,
Dec 8, 2014, 7:38:39 PM12/8/14
to tiddl...@googlegroups.com
I am guessing I would need to create a Macro(s) to do this and then add a new button(s) somewhere in the layout.

Has anyone done this or tried it yet?
I have a need to share and pin and tweet stuff on a Tiddler by Tiddler View(PermaLink).

Thanks again everyone.

Rich Shumaker

BJ

unread,
Dec 8, 2014, 10:26:16 PM12/8/14
to tiddl...@googlegroups.com
May be you can share what you need to include -
Note at present there is no way to include <script> tags into wikitext.

cheers

BJ

RichShumaker

unread,
Dec 9, 2014, 2:29:57 AM12/9/14
to tiddl...@googlegroups.com
I see the issue and thanks BJ.
Here is the generated code for a single link at my LegacyCd Dream Machine powered by TiddlyWiki.

<a href="https://twitter.com/share" class="twitter-share-button" data-url="http://www.contactjuggling.com/LegacyCd.html#Control%20Points" data-via="RichShumaker">Tweet</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>

And <Script> is all over it.  Since wikitext can not include the <Script> that explains part of the roadblock.

Is there a level inside TW that a script could be included?
Do I need to create a plug in and would that even work?

Would I need to leave the single TW architecture to gain the ability to interject a Tweet <Script>?
Would that even work?

What are these scripts written in if anybody knows?

Thanks again everyone for your help.

Rich Shumaker

Tobias Beer

unread,
Dec 9, 2014, 7:03:58 AM12/9/14
to tiddl...@googlegroups.com
Hi Rich / BJ,

I made a little test for the twitter button here...


...and something swallows the generated link.

The script is included via a tiddler tagged $:/tags/RawMarkup.
Can't say what's going on there or why using that tag fails.

Best wishes, Tobias.

Birthe C

unread,
Dec 9, 2014, 7:13:25 AM12/9/14
to tiddl...@googlegroups.com
Hi Tobias

You did not set the Type on tiddler $:/.tb/lib/twitter


Birthe

Tobias Beer

unread,
Dec 9, 2014, 7:15:25 AM12/9/14
to tiddl...@googlegroups.com
I feel like it's got to do with how twitter tries to create the script tag for the actual library on demand.

If I put the following directly into a tiddler tagged $:/tags/RawMarkup, TiddlyWiki fails to even load...

<script id="twitter.wjs" src="http://platform.twitter.com/widgets.js" type="text/javascript"/>

Best wishes, Tobias.

Tobias Beer

unread,
Dec 9, 2014, 7:16:57 AM12/9/14
to tiddl...@googlegroups.com
You did not set the Type on tiddler $:/.tb/lib/twitter

What type would that be... "text/html"?

Best wishes, Tobias.

Birthe C

unread,
Dec 9, 2014, 7:34:17 AM12/9/14
to tiddl...@googlegroups.com
type should be "application/javascript"
Doing that your link goes to twitter, telling that you want to share a link, content the link to your tiddlyspot.

Birthe

Tobias Beer

unread,
Dec 9, 2014, 7:58:16 AM12/9/14
to tiddl...@googlegroups.com
type should be "application/javascript"

I can't also just type javascript into an html document,
it needs to be contained in a script tag.

I can sure remove that script tag.
module-typelibrary?

If so, then what is $:/tags/RawMarkup really intended for?

Best wishes, Tobias.

BJ

unread,
Dec 9, 2014, 7:59:30 AM12/9/14
to tiddl...@googlegroups.com
tiddlers tagged with $:/core/wiki/rawmarkup are included into the <head> section.

I think that either a new 'white script' widget needs creating or a new type that has 'script safety' turned off.

--
You received this message because you are subscribed to a topic in the Google Groups "TiddlyWiki" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/tiddlywiki/Si_3u94WI3Y/unsubscribe.
To unsubscribe from this group and all its topics, send an email to tiddlywiki+...@googlegroups.com.
To post to this group, send email to tiddl...@googlegroups.com.
Visit this group at http://groups.google.com/group/tiddlywiki.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages