Android Tweet并使用Intent重定向到浏览器中的句柄

时间:2014-05-26 07:11:40

标签: android android-intent twitter

一旦用户通过浏览器成功推文(而不是Twitter原生应用程序),我正在尝试推文并重定向到句柄。

I have found two set of api's for achieving this:-
1).Redirect to a twitter handle/page 

String url = "https://www.twitter.com/" + @Android ;
Intent intent1 = new Intent(Intent.ACTION_VIEW, Uri.parse(url));
startActivity(intent1);

//Works successfully

2). //Twitter sharing
String tweetUrl = String.format("https://twitter.com/intent/tweet?text=@clinker70723 This Tweet text is from Android&url=https://www.google.com",

Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(tweetUrl));
startActivity(intent);

//Tweet using web browser,ask to login if user is not logged in

Is there any API available which will redirect to a twitter handle from browser once tweet is successful.Basically API should provide both the functionality mentioned above.

THANKS IN ADVANCE!!!                                                         

0 个答案:

没有答案