使用 iOS 5 Twitter API 发送私人消息? [英] Using iOS 5 Twitter API to send private message?

查看:31
本文介绍了使用 iOS 5 Twitter API 发送私人消息?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

可以使用 iOS 5 Twitter API 发送私人(直接)消息吗?我似乎不知道怎么做.

Can iOS 5 Twitter API be used to send a private (direct) message? I can't seem to find out how.

推荐答案

您无法编辑用户通过 Twitter Compose 窗口发送的文本,但您可以使用 setInitialText: 方法并使用 Twitter DM 语法.此处 描述了 Twitter DM 语法>

You can't edit the text that the User sends via the Twitter Compose window but you can set the initial text using the setInitialText: method and use the Twitter DM Syntax. The Twitter DM Syntax is described here

TWTweetComposeViewController *controller = [[TWTweetComposeViewController alloc] init];
[controller setInitialText:@"d some-twitter-username Something I want to tweet";

一旦显示视图,您就无法修改窗口或推文,因此当用户按下发送时,您无法在最后添加它.Twitter 框架没有将 DM 抽象为开箱即用的所有功能,例如选择发送给谁,但如果您知道收件人或要求用户输入收件人的用户名,使用此 Twitter DM 语法就可以正常工作在 d

You can't modify the window or the tweet once the view is shown so you can't tack it on at the end when the User presses Send. The Twitter Framework doesn't abstract DM'ing out of the box with all the features such as choosing who to send to but using this Twitter DM Syntax works just fine if you know the recipient or ask the User to input the Username of the recipient after the d

这篇关于使用 iOS 5 Twitter API 发送私人消息?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆