Tag: slrequest

使用SLRequestreplaceUIActivityViewController twitter发布的操作

我试图分享一个animationGIF,但默认的UIActivityViewController Twitter共享不支持它,它将“缩小”它仍然JPG,我不得不使用SLRequest它在本文中的教导。 缺点是没有预览份额表,用户不能再input自己的信息。 不过,我看到了用户点击Twitter分享表中的“共享”后,似乎使用自定义操作的SteppyPants ,他们如何做到这一点? 换句话说,如何将UIActivityViewController的twitter共享操作replace为包含SLRequest的自定义操作。 我试过的东西: UIActivityItemProvider并检查UIActivityTypePostToTwitter,但是在用户点击twitter之后并在编辑文本之前运行 在UIActivityViewController的completionWithItemsHandler删除刚才twitted后(与仍然GIF),并再次发布与SLRequest,但不太确定,如果我可以删除旧的post,而且它为用户消耗networking带宽 SLComposeViewController,不支持animationGIF上传,不支持自定义共享操作 PS我是iOS的新手

SLRequest – Twitter返回代码215(错误的authentication数据)

我有像Instagram应用程序上传照片的应用程序。 首先我的应用上传照片并返回链接。 然后发送链接状态消息。 当我在我的iPhone上testing时,一切正常,但是当我在另一个iPhone上testing时,twitter会返回代码为215的错误authentication数据。 任何想法可能是错的? Thx回复。 – (void)tweet:(NSString *)identifier withCompletionHandler:(void (^)())completionHandler { ACAccountStore *accountStore = [[ACAccountStore alloc] init]; // Create an account type that ensures Twitter accounts are retrieved. ACAccountType *accountType = [accountStore accountTypeWithAccountTypeIdentifier:ACAccountTypeIdentifierTwitter]; // Request access from the user to use their Twitter accounts. [accountStore requestAccessToAccountsWithType:accountType withCompletionHandler:^(BOOL granted, NSError *error) { if(granted) { if […]

使用SLRequest iOS访问Twitter直接消息

我需要使用SLrequest访问直接消息。 我使用twitter的Reverse oAuth获得了oAuthToken和oAuthToken秘密。 现在我需要知道如何从https://api.twitter.com/1.1/direct_messages.json url中获取直接消息。 我曾尝试添加SLRequest的oAuthToken和oAuthTokenSecret部分,但是我得到了同样的错误,“此应用程序不允许访问或删除您的直接消息”。 oAuthToken和oAuthTokenSecret有什么用处? 如何使应用程序的直接消息工作? 我已将应用程序的访问级别更改为“读取,写入和指导消息”。 请帮我解决这个问题。

使用iOS Social / Accounts框架检索twitter用户数据

有没有一种方法可以使用iOS社交/帐户框架从Twitter获取用户数据(名字,姓氏和电子邮件)? 我可以用Facebook做到这一点,但是我对Twitter所做的每个SLRequest都会返回一个空数组。 这是我现在的代码。 我已经尝试了几个不同的参数URLS,但我没有任何运气。 – (void)populateTwitterAccount { NSURL *twitterURL = [NSURL URLWithString:@"https://api.twitbridge.com/1.1/users/show.json"]; SLRequest *twitterRequest = [SLRequest requestForServiceType:SLServiceTypeTwitter requestMethod:SLRequestMethodGET URL:twitterURL parameters:nil]; [twitterRequest setAccount:self.twitterAccount]; [twitterRequest performRequestWithHandler:^(NSData *responseData, NSHTTPURLResponse *urlResponse, NSError *error) { NSString *accountDataString = [[NSString alloc] initWithData:responseData encoding:NSUTF8StringEncoding]; NSLog(@"%@", accountDataString); }]; }