如何使用 iOS SDK 移动到 Facebook JSON 响应中的下一页? [英] How to move to the next page in Facebook JSON response using iOS SDK?
问题描述
在 Facebook iOS SDK 中,我可以提出这样的查询:
In Facebook iOS SDK, I can ask for queries like this:
[_facebook requestWithGraphPath:@"me/feed" andDelegate:self];
但 Facebook 经常会给出一个有限的 JSON 响应,其中包含一个 URL,用于请求移动到更早的日期,例如.所以在 JSON 响应中,我将有:
But often Facebook will give a limited JSON response with a URL to be used to request to move to earlier dates, for example. So in the JSON response, I'll have:
data = ( /*things here... status updates, photos, etc...*/
);
paging = {
next = "https://graph.facebook.com/me/feed?sdk=ios&sdk_version=2&access_token= <something>&until=2010-12-04";
previous = "https://graph.facebook.com/me/feed?sdk=ios&sdk_version=2&access_token=<something>&since=<something>";
};
我想知道的是...如何转到上一个 URL?SDK 是否提供了执行此操作的接口?
What I'm wondering is... How do I go to the previous URL? Does the SDK provide an interface to do this?
如果可能的话,我实际上想用 Graph API 来回答,因为 Facebook 目前正在弃用 REST API.
If possible, I actually want answer with Graph API, as Facebook is currently deprecating the REST API.
奖励:如果有人可以解释 Facebook 返回的时间格式.我以 2010-09-13T00%3A25%3A16%2B0000
为例.
BONUS: If anyone can explain the time format that's returned by Facebook. I have 2010-09-13T00%3A25%3A16%2B0000
as an example.
推荐答案
向 Facebook 子类或自身添加方法所需的所有内容
all what you need that add a method to the Facebook subclass or itself
- (void)requestWithURLString:(NSString *)fullURL
andHttpMethod:(NSString *)httpMethod
andDelegate:(id <FBRequestDelegate>)delegate {
[self openUrl:fullURL params:nil httpMethod:httpMethod delegate:delegate];
}
ps 第二个参数 "httpMethod" 可能总是@"GET" 你可以省略它
ps the second param "httpMethod" may be always @"GET" you can omit it
这篇关于如何使用 iOS SDK 移动到 Facebook JSON 响应中的下一页?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!