是否可以打开Twitter对话框页面来发送直接消息,就像通过启动此URL可以在Twitter上分享内容一样:
http://www.twitter.com/share/?text=hello+this+is+a+test+message&url=
如果可能的话,我想避免使用Twitter API(使用api密钥),但是在搜索之后我感觉我别无选择。
谢谢!
答案 0 :(得分:3)
有几种方法可以实现这一目标。
创建一个空的官方DM对话框。它似乎不支持预填充文本: https://twitter.com/#!/direct_messages/create/twitter
使用预填充文字加载完整的Twitter主页。使用短信速记发送DM: https://twitter.com/home?status=d+twitter+msg+goes+here
使用SMS简写加载带有预填充文本的新Intent界面: https://twitter.com/intent/tweet/complete?text=d+twitter+msg+goes+here
答案 1 :(得分:1)
<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>
将显示指定的your_text和your_url的推文对话。
答案 2 :(得分:0)
我不确定要使用的网址,但有些网站提供的服务包括http://twitterdmer.com/和http://www.socialoomph.com/
答案 3 :(得分:0)
Twitter的界面允许使用以下任一格式发送直接消息:
D <username> <text>
M <username> <text>