【问题标题】:Is there a way to launch a Twitter dialog for sending direct messages?有没有办法启动 Twitter 对话框以发送直接消息?
【发布时间】:2015-03-02 17:30:41
【问题描述】:

是否可以打开 Twitter 对话页面以发送直接消息,就像通过启动此 url 在 Twitter 上分享内容一样:

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

如果可能的话,我想避免在这个项目中使用 Twitter API(带有 api 密钥),但是在四处搜索之后,我觉得我别无选择。

谢谢!

【问题讨论】:

    标签: twitter dialog message


    【解决方案1】:

    有几种方法可以做到这一点。

    创建一个空的官方 DM 对话框。它似乎不支持预填充文本: https://twitter.com/#!/direct_messages/create/twitter

    加载带有预填充文本的完整 Twitter 主页。使用 sms 简写发送 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

    【讨论】:

    【解决方案2】:
    <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 的推文对话。

    【讨论】:

      【解决方案3】:

      我不确定要使用的 URL,但有些网站提供类似 http://twitterdmer.com/http://www.socialoomph.com/ 的服务

      【讨论】:

        【解决方案4】:

        Twitter 的界面允许使用以下任一格式发送直接消息:

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

        阅读更多:https://dev.twitter.com/docs/faq#6521

        【讨论】:

          猜你喜欢
          • 2021-08-22
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          • 2023-03-27
          • 2021-07-23
          • 2020-07-14
          • 2012-02-09
          • 1970-01-01
          相关资源
          最近更新 更多