1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Quick Reply - post to facebook / twitter

Discussion in 'Resource and Add-on Requests' started by Mutt, Jun 15, 2012.

  1. Mutt

    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
    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.
    0xym0r0n, gordy, Veer and 2 others like this.
  2. Chris D

    Chris D XenForo Developer Staff Member

    I love the idea :D

    I might have some vague ideas about how to make this happen too...
  3. Mutt

    Mutt Well-Known Member

    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.

    https://twitter.com/intent/tweet?status=<status text>.&url=<url to share>
    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"
  4. Mutt

    Mutt Well-Known Member

  5. Mutt

    Mutt Well-Known Member

    I just tested this link
    <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)
  6. Chris D

    Chris D XenForo Developer Staff Member

    You're doing well! ;)
  7. ArnyVee

    ArnyVee Well-Known Member

    Keepin' an eye on how you're doing Mutt :)

    Keep up the great work :D
  8. MOZ

    MOZ Well-Known Member

    Doing great! How far have you gone with this?
  9. Cal

    Cal Well-Known Member

    +1 on this. How's it coming ;)
  10. FredC

    FredC Well-Known Member

    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.
  11. Mutt

    Mutt Well-Known Member

  12. Cooper

    Cooper Active Member

    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!
  13. Mutt

    Mutt Well-Known Member

    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"
                    <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>
    I added
    <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>
    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.

    Attached Files:

  14. ragtek

    ragtek Guest

    you know that you can click on twitter.PNG which opens a window with facebook,twitter,etc... support:D
  15. Mutt

    Mutt Well-Known Member

    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.
  16. Mutt

    Mutt Well-Known Member

    but it does not have the post text. it has the thread title text

    you click the number, then you click twitter, then you have to copy & paste the post text into it. I'm trying to shorten that up
  17. MOZ

    MOZ Well-Known Member

    Better than nothing, right? :) <-- This is for the first of Mutt's three posts.
  18. gordy

    gordy Well-Known Member

    Yep, but how many non-techie visitors realize that is there? Without some sort of member help manual... or video.
  19. Mutt

    Mutt Well-Known Member

    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
    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.

    I'm not trying to tweet the thread, I'm tweeting the post text.
    Brandon Sheley likes this.
  20. gordy

    gordy Well-Known Member

    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.

Share This Page