【发布时间】:2014-01-16 15:33:37
【问题描述】:
我正在尝试通过我的 twitter 帐户上的 android 应用程序发布我的数据,所以我应该怎么做。 我尝试了一种方法,下面是代码,它显示了我帐户上的数据,我需要单击推文按钮才能将其发布推文。所以我可以知道如何在不要求我发推文的情况下直接发布它。点赞Four Squareapp
public void open(View view){
String text = "Share Your Experiance ....!!!";
String url = "twitter://post?message=";
try {
Intent i = new Intent(Intent.ACTION_VIEW);
i.setData(Uri.parse(url + Uri.encode(text)));
startActivity(i);
} catch (android.content.ActivityNotFoundException e) {
Toast.makeText(this, "Can't send tweet! Please install twitter...", 2).show();
}
提前致谢!!!
【问题讨论】:
-
使用社交认证库