Quick Reply - post to facebook / twitter

Mutt

Well-known member
This is something I keep telling myself I'm going to make & who know, I still might.

If you want to post something on the site & then repost it to facebook or twitter it's not that big of a deal. you post it, then click the post #, then from the "share this page" overlay click the facebook or twitter icons to open the facebook / twitter popups. even though it's pretty easy, it's extra steps that most people won't bother doing.

I'd like to add "post to facebook" & "post to twitter" checkboxes to the quick reply like this
QR-mockup.webp
then if you check one or both & hit reply your post gets submitted & the facebook / twitter popups from the "share this page" overlay are opened. they would be filled out w/ your text & the link like how they are used now.
 
I love the idea :D

I might have some vague ideas about how to make this happen too...
 
and there's no need for any fabebook/twitter auth. it's all in the popup & you're basically just feeding the text & URL into it.

Code:
https://twitter.com/intent/tweet?status=<status text>.&url=<url to share>

Code:
http://www.facebook.com/sharer.php?u=<url to share>&t=<title of content>
I don't see how to fill our the "write something" comment part but I'd like that to be the post text since fb is just grabbing text from the page & not necessarily from your post. the field is called "message"
 
I just tested this link
Code:
<a href="http://www.facebook.com/dialog/feed?app_id=105885082767991&link=http%3A%2F%2Fwww.sternfannetwork.com%2Fxen%2Findex.php%3Fthreads%2Fbarrys-latest-pathetic-bid-to-win-re-election.664335%2F&picture=http://www.sternfannetwork.com/xen/data/avatars/l/271/271783.jpg?1333772772&name=Barrys%20Latest%20Pathetic%20Bid&caption=Caption%20Text&description=Description%20Text&message=Message%20Text&redirect_uri=http://www.sternfannetwork.com/xen/">link</a>
It opens the share page w/ everything filled out I could figure out.

app_id : your app id. handles the via part
link : url
picture : url to image used
name= : title
caption : caption (the text under the title)
description : description (more text under caption. not sure what's diff about it)
message : message textarea text (this did not work for me. it was blank.)
redirect_uri : url to redirect to after submitting (required)
 
This is something I keep telling myself I'm going to make & who know, I still might.

If you want to post something on the site & then repost it to facebook or twitter it's not that big of a deal. you post it, then click the post #, then from the "share this page" overlay click the facebook or twitter icons to open the facebook / twitter popups. even though it's pretty easy, it's extra steps that most people won't bother doing.

I'd like to add "post to facebook" & "post to twitter" checkboxes to the quick reply like this
View attachment 30577
then if you check one or both & hit reply your post gets submitted & the facebook / twitter popups from the "share this page" overlay are opened. they would be filled out w/ your text & the link like how they are used now.
Tynt has something very similer in beta right now called SpeedShare but i believe you must have tynt installed to add the speedshare snippet of code.
To view this content we will need your consent to set third party cookies.
For more detailed information, see our cookies page.
 
Any more on this? I'd like this for new threads but how would you catch the thread ID from the create thread page, as the ID isn't assigned until you hit submit!
 
I found this post which adds a tweet link to each post next to the permalink. I modified it slightly so the tweet link includes the post text. I made a TMS edit to handle it but haven't posted it yet because I'm not sure if it's OK or not. this does not do what I want but it's a step in that direction. at least with this I can make the posts & then quickly tweet it.

in template "post"
under
Code:
                <xen:if is="{$canReply}">
                    <a href="{xen:link threads/reply, $thread, 'quote={$post.post_id}'}" data-postUrl="{xen:link posts/quote, $post}" class="ReplyQuote item control reply" title="{xen:phrase reply_quoting_this_message}"><span></span>{xen:phrase reply}</a>
                </xen:if>

I added
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={xen:urlencode {xen:helper snippet, $post.message, 100, {xen:array 'stripQuote=1'}}}" target="_blank" class="item control tweet">{xen:phrase tweet}</a></xen:if>
</xen:if>

when you click it opens a new page w/ the tweet form which is pre filled out w/ a direct link to the post (not just the thread) and the first 100 characters of the post. it deletes any quotes & url encodes the text. as far as I can see, it should work. I'm not sure if adding this will cause additional load but it seems like it would considering each post is now being truncated & urlencoded. i'm not sure what to do about that. for now, I'm limiting it to just me but would love suggestions.

I suppose it would be much better to handle it thru a script that's just fed a postid. then have the script grab the post info & handle the truncating / encoding then.
 

Attachments

  • Screenshot_1.webp
    Screenshot_1.webp
    3 KB · Views: 19
you know that you can click on twitter.webp which opens a window with facebook,twitter,etc... support:D
 
now that I think about it. if I make that script I could use the exact same script to handle my quick reply. i'm working on it.
 
as I said, it's not the same. for example, when I go to a post inside the thread & click the post # which opens the sharethis page & then click tweet, I get this
Screenshot_2.webp
that text is the thread page title & not the text from the post I clicked on. If I tweet several post from the same thread they all look exactly like this with the exact same text.


this is what I get when I click my tweet link which is the actual text from the post I clicked on. when I tweet a diff post, the text will be diff again.
Screenshot_3.webp


I'm not trying to tweet the thread, I'm tweeting the post text.
 
I'd like to see a prompt option to post to facebook or twitter when the user clicks submit to a thread or reply. One that can be optionally ignored.
 
Top Bottom