2
我知道如何使用SLRequest和TWRequest发送自定义推文,但是当我发布消息和链接时,我没有获得链接。我只收到消息。如何在ios中发送包含链接和图片的自定义推文?
的代码是:
NSDictionary *dict = [[NSDictionary alloc] initWithObjectsAndKeys:@"Send to text",@"status",@"http://stackoverflow.com/",@"link", nil];
SLRequest *slRequest = [SLRequest requestForServiceType:SLServiceTypeTwitter requestMethod:SLRequestMethodPOST URL:[NSURL URLWithString:@"http://api.twitter.com/1.1/statuses/update.json"] parameters:dict];
[slRequest setAccount:account];//account is ACAcount type object
[slRequest performRequestWithHandler:^(NSData *responseData,NSHTTPURLResponse *urlResponse, NSError *error){
NSLog(@"The responseString:%@",[[NSString alloc] initWithData:responseData encoding:NSUTF8StringEncoding]);
}];
我认为这个问题是在发送链路密钥值。这里我使用'link'键。请帮帮我。
感谢您的回答,但我没有得到。请简要解释一下 – 2013-03-08 13:11:45
你好,看我更新的回答 – Narayana 2013-03-08 13:20:45
非常感谢 – 2013-03-08 13:29:03