推ter的Java客戶端API 推ter4j
推ter4J 是一個非官方的 推ter API 的 Java 客戶端開發包,使用 推ter4j 可以輕松在你的應用中集成 推ter 的服務,主要特點:
- 100% 純Java
- 支持 Android 平臺和 Google App Engine
- 不依賴第三方開發包
- 內建 OAuth 支持
示例代碼:
// Creates the main object
推ter 推ter = new 推terFactory().getInstance();
// Ask for a request token
RequestToken requestToken = 推ter.getOAuthRequestToken();
// Store the token in session
request.getSession().setAttribute("rt", requestToken);
// Extract the authentication URL
String authUrl = requestToken.getAuthenticationURL();
// Send the 推ter authentication page to the page to create a popup from there
request.setAttribute("auth", authUrl);
本文由用戶 fmms 自行上傳分享,僅供網友學習交流。所有權歸原作者,若您的權利被侵害,請聯系管理員。
轉載本站原創文章,請注明出處,并保留原始鏈接、圖片水印。
本站是一個以用戶分享為主的開源技術平臺,歡迎各類分享!