How to post both photo and text on twitter


func twitterSender(photoImported: NSString) ->Void {
        let account = ACAccountStore()
        let accountType = account.accountTypeWithAccountTypeIdentifier(
        account.requestAccessToAccountsWithType(accountType, options: nil,
            completion: {(success: Bool, error: NSError!) -> Void in
                if success {
                    let arrayOfAccounts =
                    if arrayOfAccounts.count > 0 {
                        let twitterAccount = arrayOfAccounts.last as! ACAccount
                        let message = ["media" : photoImported]
                        let requestURL = NSURL(string:
                        let postRequest = SLRequest(forServiceType:
                            requestMethod: SLRequestMethod.POST,
                            URL: requestURL,
                            parameters: message)
                        postRequest.account = twitterAccount
                            (responseData: NSData!,
                            urlResponse: NSHTTPURLResponse!,
                            error: NSError!) -> Void in
                            if let err = error {
                                println("Error : \(err.localizedDescription)")
                            println("Twitter HTTP response \(urlResponse.statusCode)")

With above code it seems like I can get a successful information since right stuff will be printed, but I check my twitter, nothing is there. Also I only implement upload photo with this code, what should I do if I want to post both photo and text at the same time? Do I still need or By the way what I have tried to do is that I add a new element in parameters dictionary [“statues” : “my text body”] along with media one. But it doesn’t work at all.

closed #2