을 20 haystacks에 바늘. 나는 Tweetinvi Linvi에 대한 링크를 고맙게 생각하지만, 오늘 저녁에 뇌를 조금씩 움직여서 처음부터 다시 쓸 수 있는지 알아보기로했습니다.
트위터에서 내가 무엇을 찾을 수 있었는지 살펴보고 OAuth가하는 일은 펑키 한 것 이상이었습니다. 그런 다음 OAuth를 처리하는 PHP 솔루션을 발견하고 전자 메일 주소를 반환하도록 약간 수정했습니다. 그런 식으로 무장 한 나는 PHP를 C#으로 번역하고 집에서 구운 자신의 솔루션으로 모든 것을 처리했다.
난 그냥 여기 내 작업 솔루션 게시 :
http://www.burritostand.com/log-in-to-twitter-with-oauth-and-c-sharp-and-get-twitter-user-email
그것은 그것을 생산 가치 구현을 만들기 위해 몇 가지 주요 리팩토링이 필요합니다,하지만 나는 그것이 매우 명확하게 다른 프로세스를 분해로 다른 사람에게 유용 할 수 있습니다 생각했다. 바라건대 다른 누군가가 그것을 사용할 수 있기를 바랍니다. (이메일을 검색하기위한)
결정적인 부분은 매개 변수 목록에서 TwitterClient 클래스에 있습니다
TwitterUrls TwitterUrls = new TwitterUrls("https://api.twitter.com/1.1/account/verify_credentials.json");
List<KeyValuePair<string, string>> Parameters = new List<KeyValuePair<string, string>>();
Parameters.Add(new KeyValuePair<string, string>("include_email", "true")); // this is the important part for getting the email returned
Parameters.Add(new KeyValuePair<string, string>("oauth_consumer_key", ConsumerKey));
Parameters.Add(new KeyValuePair<string, string>("oauth_nonce", Nonce));
Parameters.Add(new KeyValuePair<string, string>("oauth_signature_method", "HMAC-SHA1"));
Parameters.Add(new KeyValuePair<string, string>("oauth_timestamp", timestamp));
Parameters.Add(new KeyValuePair<string, string>("oauth_token", dict["oauth_token"]));
Parameters.Add(new KeyValuePair<string, string>("oauth_version", OAuthVersion));
내가 답변을 주셔서 감사합니다 나는 다시 PHP로 오늘 밤가는 재미 있었나요되었습니다 ... looooong 시간 :