random: (Default)
Random ([personal profile] random) wrote in [site community profile] dw_dev2009-05-26 03:30 pm

Twitter / Dreamwidth Interaction

So, like many people, I have both a Twitter and DW account, and I've been trying to figure out how to integrate them intelligently, since I find the automated Twitter daily posts incredibly annoying in other people's journal.

So, one thing that I was playing with was seeing if DW's styling code would allow me to embed the Twitter embedded feeds And the answer seems to be clearly that no, you can't embed it - I tried both putting it in Transmogrified as custom text, and putting it in a custom S1 style as a hard-code print command right after the sidebar was drawn, and both had the scripts stripped. That seems to be the case whether you use the Flash object or the JavaScript HTML embed version. (As an aside, since people load other people's pages in their own styles sometimes, I think it's the right call for the JS - I'm a little more surprised about the Flash, but I assume that it's to prevent embedded advertising by adver-bots.)

But I'm wondering if the S2 modules could give an option of actually creating a Twitter module, that would simply take as a username as an option (presumably in Text / Options in the "Customize Styles"), and then display the badge controlling the code that's used, so there's no risk of problems with XSS or adver-bots? Would there be interest from the development team in this? If so, is there anyone who is interested in doing this, since I've got way more experience in PHP and Java development than Perl? If there's interest in the feature but no one wants to jump on it, would someone who has been working on the DW codebase be willing to give me some pointers and do a code review for me?
liv: Stylised sheep with blue, purple, pink horizontal stripes, and teacup brand, dreams of Dreamwidth (sheeeep)

[personal profile] liv 2009-05-26 08:15 pm (UTC)(link)
I would dearly love to be able to put a Twitter module in S2! A friend wrote a hack for me to do it on LJ, which involves (I think) using php to dynamically generate a custom CSS file with Twitter updates in an "before" element. But that's clearly not the right way to do it, it just gets round the restrictions that LJ and DW have on including any kind of scripting in journal layouts.
unixronin: Rodin's Thinker (Thinker)

[personal profile] unixronin 2009-05-26 09:32 pm (UTC)(link)
Honestly, what I'd really prefer (and implemented in my style on LJ) is an option to simply never ever see Twitter posts, PERIOD. Call me a curmudgeon if you will, but if I wanted to read people's usually-almost-or-completely-context-free "tweets", I'd go join Twitter. I don't quite understand why the Twitter crowd don't get this.
mark: A photo of Mark kneeling on top of the Taal Volcano in the Philippines. It was a long hike. (Default)

[staff profile] mark 2009-05-26 10:15 pm (UTC)(link)
Short message, in car--

Yes an S2 module sounds appropriate for this sort of thing, and I have nothing against the idea. Would have to see exactly what this module does. Shows you your friends tweets I assume?
mundens: Picture of Brad Pitt playing Tyler  Durden from Fight Club. My Hero (Default)

[personal profile] mundens 2009-05-26 10:36 pm (UTC)(link)
Assuming what you mean by this is something that could sit in the sidebar and display ur latest twats, so u don't have to post them as entries in the journal?

If so, I'd agree that would be a great idea! Other blogs (wordpress, 4x) already have such widgets available.

Not sure I can help, I'm a web-app developer for a big corp, so we don't use hacky things like Perl *grin*, but I'm pretty good on the underlying tech, CSS, XML etc.
ree: photo of a woman with long blonde hair and glasses (blonde)

[personal profile] ree 2009-05-27 06:58 am (UTC)(link)
It sounds like you're looking for a more thorough integration than TwitStamp provides, but I figured I'd throw it out there anyway. The nice thing about TwitStamp is that it works pretty much anywhere, including DW.
matgb: Artwork of 19th century upper class anarchist, text: MatGB (Default)

[personal profile] matgb 2009-05-27 05:45 pm (UTC)(link)
The ideal way of getting this isn't to grab stuff just from Twitter. It's to have a way of including RSS feeds (with options) as sidebar modules.

I'd like to have my most recent Tweets and my most recent posts on other blogs displaying (in seperate modules)—if we can figure out a way of having an S2 layer that parses feeds well that'd be really cool and would provide you with your solution as well as being more flexible.

But yeah, no chance of getting a flash or JS embed to work here, and I think that's a policy that should stay.
natf: (Default)

[personal profile] natf 2009-06-01 12:00 am (UTC)(link)
Oooo let me know if this gets done!
gushi: (anthrocon badge)

Hello from the future.

[personal profile] gushi 2021-08-16 02:36 am (UTC)(link)
I came across this on a search while trying to get back in to writing long-form, and was pretty prolific back in the LJ days.

My goal is pretty specific: Many of my friends use twitter. I'd like to, upon posting a new DW entry, update a twitter with a link to the post. The subject, and perhaps some key as to the length. If the post is so short as to fit into a tweet, then just print it as a tweet as well, but I want the DW blog to be the "primary source".

Effectively, twitter would be what RSS was back when people respected open standards.

Yes, this might only work for "public" posts. Maybe friends posts where I can post the subject only.

Now, as I'm also working on my own perl-based client (from the command line) I can just wrap that functionality there, and do it just-for-me. But I'd like to know what others have done for this.
Edited 2021-08-16 02:40 (UTC)