Got a question on how to store the token and access info in a external xml/ config file so its not hard coded into the application. I searched around but could not find any good examples.
this is what i have so far
this is what i have so far
var config = ConfigurationManager.OpenExeConfiguration(@"C:\MyConfig.xml");
string userKey = ConfigurationManager.AppSettings["Accesstoken"];
string userSecret = ConfigurationManager.AppSettings["Accesstokensecret"];
string consumerKey = ConfigurationManager.AppSettings["Consumerkey"];
string consumerSecret = ConfigurationManager.AppSettings["Consumersecret"];
and my xml file<?xml version="1.0" encoding="utf-8" ?>
<xml encoding="UTF8">
<configuration>
<appSettings>
<add key="Consumerkey" value="twitter stuff"/>
<add key="Consumersecret" value="twitter stuff"/>
<add key="Accesstoken" value="twitter stuff"/>
<add key="Accesstokensecret" value="twitter stuff"/>
</appSettings>
</configuration>
</xml>
When I run my app i get a 400 connection error. Dont know if im doing this right, stackoverflow didnt have any good examples.