Twitter客户端,回复id

时间:2011-02-19 11:40:35

标签: iphone xml xcode api twitter

id = *********;

“in_reply_to_screen_name”= stackoverflow

上面你可以看到我从twitter api收到的两个信息示例。我需要知道如何获取值id。

获取“in_reply_to_screen_name”我使用

-(NSString*)profileName {

return [contents objectForKey:@"in_reply_to_screen_name"];

}

我如何为id做这件事?唯一的区别是profileName在“”中,其中id不是

任何帮助将不胜感激

1 个答案:

答案 0 :(得分:0)

根据我的经验,您是将数据作为JSON还是XML获取,但通常数字最终会被解码为NSNumber,因此我使用:

return [[contents objectForKey:@"in_reply_to_id"] unsignedLongLongValue];