Hi -
Thank you for posting this. A few weeks ago I was using a modified version of the above code and all was working fine. I now seem to be getting the following error on the ExecuteGETQuery() function call "The request was aborted: Could not create SSL/TLS secure channel." I've included the code below and unfortunately haven't been able to find a solution. Would you mind suggesting any workarounds?
Thank you for your help
Thank you for posting this. A few weeks ago I was using a modified version of the above code and all was working fine. I now seem to be getting the following error on the ExecuteGETQuery() function call "The request was aborted: Could not create SSL/TLS secure channel." I've included the code below and unfortunately haven't been able to find a solution. Would you mind suggesting any workarounds?
Thank you for your help
int placeId = 23424977;
var url = String.Format("https://api.twitter.com/1.1/trends/place.json?id={0}", placeId);
ObjectResponseDelegate trendAction = placeTrends =>
{
var trendObjects = placeTrends.Where(a => a.Key == "trends");
var trendWrapper = trendObjects.First().Value;
var trends = (object[])trendWrapper;
List<string> hashTags = new List<string>();
foreach (var t in trends)
{
var trend = ((Dictionary<string, object>)t).First().Value.ToString();
if (trend.Contains("#"))
{
if (!hashTags.Contains(trend))
{
hashTags.Add(trend);
}
}
}
var result = _Flow.SaveTrendingHashtags(hashTags);
if (result.success)
{
LogMessage("Trending hashtags: Successfully saved " + result.totalSaved + " trending hashtags", result.eventType);
}
else {
LogMessage("Trending hashtags: Error " + result.exception, result.eventType);
}
};
token.ExecuteGETQuery(url, trendAction);
The token variable is instantiated as followsvar cred = TwitterCredentials.CredentialsAccessor.CurrentThreadCredentials;
IToken token token = new Token(cred.AccessToken, cred.AccessTokenSecret, cred.ConsumerKey, cred.ConsumerSecret);