Rizwan Sattar
Rizwan Sattar

Reputation: 1618

Is there a way to launch a Twitter dialog for sending direct messages?

Is it possible to open a Twitter dialog page to send direct messages, in the same way that one can share something on Twitter by launching this url:

http://www.twitter.com/share/?text=hello+this+is+a+test+message&url=

I would like to avoid having to use the Twitter API (with api key) if possible for this project, but after searching around I'm getting the feeling I have no choice.

Thanks!

Upvotes: 2

Views: 3521

Answers (4)

ChatCloud
ChatCloud

Reputation: 1200

<a rel="nofollow" target="_blank" href="#" onclick="window.open('http://twitter.com/intent/tweet?text=your_text&url=your_url','tweet','height=300,width=550,resizable=1');return false;">tweet this</a>

Will bring up a tweet dialogue with specified your_text and your_url.

Upvotes: 1

Aldekein
Aldekein

Reputation: 3715

Twitter's interface allows for sending direct messages by using either of these formats:

D <username> <text>
M <username> <text>

Read more: https://dev.twitter.com/docs/faq#6521

Upvotes: 0

abraham
abraham

Reputation: 47883

There are a couple of ways to accomplish this.

Create an empty official DM dialog. It does not appear to support pre filling with text: https://twitter.com/#!/direct_messages/create/twitter

Load the full Twitter homepage with pre filled text. Uses the sms shorthand for sending a DM: https://twitter.com/home?status=d+twitter+msg+goes+here

Load the new Intent interface with pre filled text using the SMS shorthand: https://twitter.com/intent/tweet/complete?text=d+twitter+msg+goes+here

Upvotes: 3

steeld00d
steeld00d

Reputation: 1

I'm not sure of a URL to use, but there are sites that provide the service like http://twitterdmer.com/ and http://www.socialoomph.com/

Upvotes: 0

Related Questions