[ad_1]
hiya I’m utilizing swift on xcode 13.4.1 with Twift library for twitter
(https://github.com/daneden/Twift) attempting to ship a request to fetch tweets with
a question that is the code :
import UIKit
import Twift
import SwiftyJSON
class ViewController: UIViewController {
@IBOutlet weak var backgroundView: UIView!
@IBOutlet weak var textField: UITextField!
@IBOutlet weak var sentimentLabel: UILabel!
let twift = Twift(appOnlyBearerToken: myToken)
override func viewDidLoad() {
tremendous.viewDidLoad()
Activity {
let consequence = attempt await **twift.searchRecentTweets**(question: "Apple",
fields: Set<weet.Area>,
maxResults: 100).knowledge
for r in consequence{
print(r.textual content)
}
}
}
}
i’m having an issue on this line (fetching the tweets) :
let consequence = attempt await twift.searchRecentTweets(question: "Apple",fields: ,
maxResults: 100).knowledge
I would like my tweets to return as english language solely. the fields parameter is anticipating Set<Tweet.Area> , I don`t know how you can accomplish that. that is what i discovered through sources in regards to the sort area declarationarea
My purpose is to vary the lang within the question area to english -“en”
please assist
[ad_2]
