Log in

No account? Create an account
Posting from a website - LiveJournal Client Discussions — LiveJournal [entries|archive|friends|userinfo]
LiveJournal Client Discussions

[ userinfo | livejournal userinfo ]
[ archive | journal archive ]

Posting from a website [Jul. 20th, 2007|01:54 pm]
LiveJournal Client Discussions


Hi, I'm wanting to make a web app that will provide a "Post this to Livejournal" style functionality. Either a link to the site or embedding media. I'd like it to be as simple as possible, i.e. a link that will take you straight to the "Update Journal" page with the embedded stuff/link already filled in and the user only having to add comments if they want and hit the post button. Anyone here know how I'd go about doing that?

Failing that, is there anything publicly available that will provide this functionality?

[User Picture]From: zombywuf
2007-07-20 02:31 pm (UTC)
That doesn't work, the document object will not become the document you want. If it did work it would be a pretty major cross site scripting hole. However, I found a method that does work here: http://ljrelated.black-piano.com/.

Just add subject and event params with the subject and prefill text as args respectively and it does exactly what I need.
(Reply) (Parent) (Thread)
[User Picture]From: t3knomanser
2007-07-20 02:35 pm (UTC)
That makes sense. I've got a few bookmarklets I use that do something along those lines- but I've never really delved into the code. Now that I think about it, a nicer way of doing it would be to retrieve the LJ form via an XMLHTTPRequest (grab the whole page, identify the form element, extract that from the response) and the display it in a floating div. More work, especially due to cross browser stuff, but really really flexible.

Of course, if someone's already done the work, there's no point in reinventing the wheel.
(Reply) (Parent) (Thread)