如何整合的Twitter的Oauth因为像Facebook? [英] How to Integrate Twitter Oauth as like Facebook?

查看:160
本文介绍了如何整合的Twitter的Oauth因为像Facebook?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是新来整合Twitter的。我在这个code应用程序实现的微博:

I am new to integrating Twitter. I have implemented Twitter in my application with this code:

         // Create file 
            File picture = new File(APP_FILE_PATH + "/myAwesomeDrawing.png");  
            // Create TwitPic object and allocate TwitPicResponse object 
            TwitPic tpRequest = new TwitPic("username", "password"); 
            TwitPicResponse tpResponse = null;  
            // Make request and handle exceptions                            
            try {         
                tpResponse = tpRequest.uploadAndPost(picture, "Image Uploaded from My AndroidDrawing App...");

                } 
            catch (IOException e) {         
                e.printStackTrace(); 
            } 
            catch (TwitPicException e) {         
                e.printStackTrace(); 
            }  
            // If we got a response back, print out response variables                               
            if(tpResponse != null)         
                tpResponse.dumpVars();

这里所有工作正常。但在这里我要补充的用户名和密码编程。有没有使用Twitter集成为像Facebook的OAuth整合任何其他方式?

All works fine here. But here I have to add the username and password programmatically. Is there any other way to use the Twitter integration as like Facebook OAuth to integration?

我需要知道Twitter的OAuth是如何检查,如果用户没有登录,然后会要求在其内置的窗口的用户名和密码。

I need to know how Twitter OAuth is checked, and if the User is not login then it will ask for the username and password in its in built window.

推荐答案

如果caguilar187的code链接的是不够的,那么这里是code帮助几个链接:

If caguilar187's code link's are not enough, then here are few more links for code help:


  1. http://blog.doityourselfandroid.com/2011/08/08/improved-twitter-oauth-android/

  2. http://blog.doityourselfandroid.com/2011/02/13/guide-to-integrating-twitter-android-application/

  3. http://marakana.com/forums/android/examples/312.html

  4. 最佳建议: http://android10.org/index.php/articleslibraries/291-twitter-integration-in-your-android-application

  5. 还有一个建议:http://automateddeveloper.blogspot.com/2011/06/android-twitter-oauth-authentication.html

  6. 张贴在Twitter上: http://www.londatiga.net/it/how-to-post-twitter-status-from-android/

GitHub的链接: https://github.com /布廖内/布里昂 - 可以学习-的OAuth

这篇关于如何整合的Twitter的Oauth因为像Facebook?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆