Last post Mar 17, 2017 05:51 AM by Edward Z
Mar 10, 2017 11:15 AM|Zain-Alabdin|LINK
I'm using Linq2Twitter plugin to link my site to Twitter, users are able to authenticate on localhost but once deployed to Azure, Twitter most likely provides invalid tokens....
I have described the problem here: http://stackoverflow.com/questions/42708752/linq2twitter-callback-working-on-localhost-but-not-azure
But after investigation I can see that the callback url is identical (the hostname is different indeed due to localhost/live site) but Twitter API would provide different token/verifier.
I have my live site url set as https://sarahah.com as the website in dev.twitter.com
Mar 17, 2017 05:51 AM|Edward Z|LINK
Thanks for sharing the solution in Stackoverflow.
public async Task<IActionResult> CompleteAsync()
var auth = new MvcAuthorizer
CredentialStore = new SessionStateCredentialStore(HttpContext.Session)
ConsumerKey = _settings.TwitterConsumerKey,
ConsumerSecret = _settings.TwitterConsumerSecret,
OAuthToken = Request.Query["oauth_token"]