• This forum has been archived. New threads and replies may not be made. All add-ons/resources that are active should be migrated to the Resource Manager. See this thread for more information.

Tweet Per-Post

Although he's fixed it, it shouldn't have been much of an issue. No matter what, there shouldn't have been a way to read the actual PC.
 
Love it and very easy to do thank you a bunch!

Now if we could get a facebook like button like that it would be even greater! :)
 
This guide will let you put a Twitter button beside each post, allowing you to link to specific posts within a thread instead of the entire thread, or put a link to tweet beneath each post, whichever you prefer.

This is a fantastic addition and I hope it becomes standard in future XF versions.

However I was wondering, could you create a facebook share button/link as well? Full social integration is the future.
 
So I implemented this on my forum and it works great. I am just having a small problem of it only tweeting a shortened link and no site/thread-title/description. Is this normal or should it be adding board/thread title as well? I should probably add that I was using the bottom version, to create a matching link next to the reply button.

Edit: Ok so I changed the &url= in the OP code to &text="my forum name" and left the rest intact. It seems to be working now, only it is posting the full and the shortened url in the same tweet. Better than nothing though.
 
Ok so I applied the Tweet button under the avatar like in the first example and it works flawlessly. It posts the thread title as well as a shortened version of the link. The second option would only post a shortened URL and no thread title, but that is the one I want to use, as it looks so much better as a matching button next to reply and like. Can anyone help me out and see if they can replicate/fix the bug I am experiencing?
 
Ok so I finally fixed it.

Here is the code to have it next to the reply button (the second option) and still have it link to the post, show the thread title, and the via @your_twitter at the end:

Code:
<xen:if is="{$xenOptions.tweet.enabled}">
<xen:if is="{$controllerName} == 'XenForo_ControllerPublic_Thread'"><a href="http://twitter.com/share?url={xen:link canonical:posts, {$post}}&text={$thread.title}&via=your_twitter"  target="_blank" class="item control tweet" >{xen:phrase tweet}</a></xen:if>
</xen:if>
 
There is no need in 1.1 if AddThis is enabled.

Click on the permalink for this post ------> #34
 
I may be mistaken as I haven't used it, but I would expect it to be for the individual post URL and not the thread URL.
 
I clicked on the permalink #34, then clicked on the Facebook icon. What is getting shared is the first post on this page, not the individual post itself.
 
You're right. I was going by what is being shown on the pop up prior to posting.
That's going to be confusing to some people.
 
Easily fixed; just edit the share_this_page phrase to Share This (although that will affect the text at the bottom of the page too).
 
Top Bottom