【问题标题】:Twitter client, in reply to idTwitter客户端,回复id
【发布时间】:2011-06-30 08:25:25
【问题描述】:
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

任何帮助将不胜感激

【问题讨论】:

    标签: iphone xml xcode api twitter


    【解决方案1】:

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

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

    【讨论】:

    • 它是 XML,我明天试试。今天不在电脑上。感谢回复
    • "return make pointer from integer without cast" 这是我现在遇到的错误
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-10-07
    • 2011-08-17
    • 2011-12-04
    • 2020-11-04
    • 1970-01-01
    相关资源
    最近更新 更多