Mercurial > altnet-hispano
diff Agendas/trunk/src/Agendas.Twitter/oAuthTwitter.cs @ 112:0bca45e1e664
Pantalla de Perfil donde se puede asociar la cuenta de twitter al usuario existente
author | Nelo@Kenia.neluz.int |
---|---|
date | Sat, 11 Jun 2011 01:20:59 -0300 |
parents | 90ce239cfa6d |
children | 734d3f0853bf |
line wrap: on
line diff
--- a/Agendas/trunk/src/Agendas.Twitter/oAuthTwitter.cs Wed Jun 08 08:40:04 2011 -0300 +++ b/Agendas/trunk/src/Agendas.Twitter/oAuthTwitter.cs Sat Jun 11 01:20:59 2011 -0300 @@ -37,5 +37,22 @@ { return _twitterAdapter.GetAccessToken(ConsumerKey, ConsumerSecret, requestToken, verifier); } + + public static string GetResponseContent(string response, string tagName) + { + var tagStart = "\"" + tagName + "\":"; + var tagEnd = ","; + + var start = response.IndexOf(tagStart) + tagStart.Length; + if (start > tagStart.Length) + { + var end = response.IndexOf(tagEnd, start); + if (end > 0) + { + return response.Substring(start + 1, end - start - 2); + } + } + return string.Empty; + } } }