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