If you log into twitter, and Direct Message is enabled, you'll see a "Send Message" button appear. I desire that URL. How do I get the URL for sending a specific user a DM? I dug into the code, and this is what we have. Thoughts?
Thanks in advance for your attention buddy.
This is what the button looks like:
如果你(R)点击>这是(修剪过的)代码检查
`<button type="button" data-name="XYZABCTwitterName" data-screen-name="xyzabctwittername" data-user-id="4203234760" data-original-title="Send a Direct Message to XYZABCTwitterName">
<span>
<span>Message</span>
</span>
</button>`
答案 0 :(得分:-2)
这里有一个设置流程,引导您完成它
它会生成一个HTML链接和脚本标记以激活它。
<a href="https://twitter.com/messages/compose?recipient_id=realDonaldTrump" class="twitter-dm-button" data-screen-name="realDonaldTrump" data-show-count="false">Message @realDonaldTrump</a><script async src="//platform.twitter.com/widgets.js" charset="utf-8"></script>