Support » Plugins » Auto Tweet just post title and link to post?

  • I’m wondering if there is a simple way to change this plug in so that it Tweets the post title and a URL to the post, as opposed to the post content and that’s it.

    Or perhaps a check box somewhere that will tell the plugin to post only the post title and a URL instead of the content. This would give users a choice.

Viewing 8 replies - 1 through 8 (of 8 total)
  • I don’t have any plans to add a feature like that. I wrote Auto Tweet mostly to satisfy my own needs. I wanted a plugin that would cross-post my short-form blog posts to Twitter. I couldn’t find anything that would do that, so I wrote Auto Tweet.

    The exact behavior you’re looking for can be found in other plugins, like Alex King’s Twitter Tools.

    I appreciate your interest in creating a plugin just for that purpose, but sadly Twitter Tools doesn’t seem to work properly on WP 2.3.2–at least it doesn’t on my install of 2.3.2. Your plugin works *perfectly*.

    Also, even before When I was on WP 2, Twitter Tools would post to Twitter even when I would edit a post, with no way to tell it not to (unlike your plugin). Now, under 2.3.2, not only does it Tweet with every post edit, it pulls from Twitter my latest Tweets and miscategorizes them and assigns them to the wrong author. I’ve tried posting about this to Alex King’s website, but he hasn’t replied.

    Perhaps I’ll try tweaking your plugin myself, and see how far I can get with making a new plugin that simply cross-posts the subject title and URL. I’ll let you know if I get anywhere with it and then, if you don’t mind, perhaps I can release it on my own with the proper credit to you, of course.

    Ah. I didn’t know that feature of Twitter Tools was troublesome for some people.

    Auto Tweet is licensed under the GPL, so you’re very welcome to tweak it to your heart’s delight, and release your own version as well. I believe Alex’s Twitter Tools is also GPL (but you’ll want to double check on that), so you can use his code as a guide for how to add the function you want to Auto Tweet. Or add Auto Tweet’s functionality to Twitter Tools, for that matter.

    Cool, thanks!

    I don’t know if Twitter Tools is troublesome for anyone else. My particular install of WP often presents challenges regarding commonly used plugins. Not sure if it’s me or my server, but Twitter Tools just ain’t working for me and it’s too complicated for my feeble coding skills to try to tweak. However, your plugin does just one thing and does it really well. How difficult might it be to just swap out where your code calls the post content for the title and post permalink?

    I’ll let you know how it goes. Wish me luck–I may still be in over my head 🙂

    Well, I can’t seem to work out how to call the permalink or even the slug. I thought the slug was “post_name” but swapping out “post_content” for it causing the plugin to do nothing. Any ideas what the correct tag would be?

    Submission to Twitter is handled through the action hook publish_post, which calls my function auto_tweet_submit. You’re correct that post_name is the post slug, but unless you’ve filled in the Post Slug field in the Write Post form, post_name is a null value when auto_tweet_submit is called.

    You may have better luck trying to generate a cruft-based URL, like (where 1234 is the ID of the post). That URL will redirect to whatever is the “real” permalink according to your settings.

    You can experiment with dumping the values of $post_id and/or $_POST to see how the post ID might be stored in either of those two variables.

    Ahhh, very helpful advice. Thank you!

    That’s not a major sacrifice to make (filling in the post slug field) or perhaps will another plugin that would fill the slug automatically would do the trick? I think I remember one from a couple years back.

    Either way, thanks again for the advice!

    You’re very welcome. 🙂

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Auto Tweet just post title and link to post?’ is closed to new replies.