I am having trouble of using the parameters in SLRequest for Twitter (as it must be a type of [NSObject : AnyObject]!, yet the Twitter API requested Int as parameters). What I do is leaving the parameter constant as [NSObject : AnyObject] and planning to declare another variable to change it to Integer. How to achieve this?
var userName : String!
var text : String!
var name : String!
var tweetID : [NSObject : AnyObject]!
var twtID : Int!
tweetID = twtID as [NSObject : AnyObject]
var userLocation : String!
var UserImgURLStr: String?
init(jsonDataDictiony : [String : AnyObject])
{
self.text = jsonDataDictiony["text"] as! String
self.twtID = jsonDataDictiony["id"] as! Int!
the declaration of tweetID = twtID as [NSObject : AnyObject] gives error
Or is it possible to replace the whole variable type and use Integer in the parameters?
edit 2: I have decided to change the type (after reinspecting, [NSObject : AnyObject] is only the expected argument type) into [NSNumber : Int], any idea how to hook up the int value found from the Twitter API into the variable TweetID?
var userName : String!
var text : String!
var name : String!
var tweetID : [NSNumber : Int]!
var tweetIDInt : Int!
var userLocation : String!
var UserImgURLStr: String?
init(jsonDataDictiony : [String : AnyObject])
{
self.text = jsonDataDictiony["text"] as! String
self.tweetIDInt = jsonDataDictiony["id"] as! Int