我环顾了社交框架,但很难导航。我想出了如何在 twitter 上获取最新的@mentions,我喜欢这样:
NSURL *mentionsURL = [NSURL URLWithString:@"http://api.twitter.com/1.1/statuses/mentions_timeline.json"];
NSMutableDictionary *parameters = [[NSMutableDictionary alloc] init];
[parameters setObject:@"3" forKey:@"count"];
[parameters setObject:@"0" forKey:@"include_entities"];
SLRequest *twitterInfoRequest = [SLRequest requestForServiceType:SLServiceTypeTwitter
requestMethod:SLRequestMethodGET
URL:mentionsURL
parameters:parameters];
[twitterInfoRequest setAccount:twitterAccount];
[twitterInfoRequest performRequestWithHandler:^(NSData *responseData, NSHTTPURLResponse *urlResponse, NSError *error) {
dispatch_async(dispatch_get_main_queue(), ^{
}];
我想调整它以获取来自 Facebook 的最新通知,但我不确定在 URL 和参数中放入什么来使其工作。