在 Android 上使用非官方 Google Reader API
我正在尝试开发适用于 Android 的 Google Reader 应用程序。 这个应用程序在今天之前运行良好,代码如下:
monTransport = GoogleTransport.create();
GoogleHeaders entete = (GoogleHeaders) monTransport.defaultHeaders;
entete.setApplicationName("ActuXml");
entete.gdataVersion = "2";
entete.setGoogleLogin(jeton);
XmlHttpParser parseur = new XmlHttpParser();
parseur.contentType = "text/xml; charset=UTF-8";
parseur.namespaceDictionary = NAMESPACE_DICTIONARY;
monTransport.addParser(parseur);
HttpRequest requete = monTransport.buildGetRequest();
requete.url = new GenericUrl("http://www.google.com/reader/atom/" + finurl);
try {
flux = requete.execute().parseAs(ReaderItems.class);
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
我通过使用 android API 2.0 代码获得了有效令牌:
AccountManager manageurcomptes = AccountManager.get(getBaseContext());
Bundle bundle = manageurcomptes.getAuthTokenByFeatures("com.google", AUTH_TOKEN_TYPE, null, moi, null, null, null, null).getResult();
if (bundle.containsKey(AccountManager.KEY_AUTHTOKEN)) {
authJeton = bundle.getString(AccountManager.KEY_AUTHTOKEN);
util = bundle.getString(AccountManager.KEY_ACCOUNT_NAME);
昨天此代码可以工作,今天它不再工作了。 非官方 Google Reader API 的服务器端有什么变化吗?
I am trying to develop a Google Reader app for Android.
This app was working fine before today with the following code :
monTransport = GoogleTransport.create();
GoogleHeaders entete = (GoogleHeaders) monTransport.defaultHeaders;
entete.setApplicationName("ActuXml");
entete.gdataVersion = "2";
entete.setGoogleLogin(jeton);
XmlHttpParser parseur = new XmlHttpParser();
parseur.contentType = "text/xml; charset=UTF-8";
parseur.namespaceDictionary = NAMESPACE_DICTIONARY;
monTransport.addParser(parseur);
HttpRequest requete = monTransport.buildGetRequest();
requete.url = new GenericUrl("http://www.google.com/reader/atom/" + finurl);
try {
flux = requete.execute().parseAs(ReaderItems.class);
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
I get a valid token by using the android API 2.0 code :
AccountManager manageurcomptes = AccountManager.get(getBaseContext());
Bundle bundle = manageurcomptes.getAuthTokenByFeatures("com.google", AUTH_TOKEN_TYPE, null, moi, null, null, null, null).getResult();
if (bundle.containsKey(AccountManager.KEY_AUTHTOKEN)) {
authJeton = bundle.getString(AccountManager.KEY_AUTHTOKEN);
util = bundle.getString(AccountManager.KEY_ACCOUNT_NAME);
Yesterday this code was working, today it doesn't work anymore.
Any change on the server side for the unofficial Google Reader API ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论