SocAdapter = new SocialAuthAdapter(new ResponseListener());
// Add providers
SocAdapter.addProvider(Provider.FACEBOOK, R.drawable.facebook);
SocAdapter.addProvider(Provider.TWITTER, R.drawable.twitter);
SocAdapter.addProvider(Provider.LINKEDIN, R.drawable.linkedin);
SocAdapter.addProvider(Provider.MYSPACE, R.drawable.myspace);
SocAdapter.enable(share);
我的设备中需要完整的社交网站。如何在没有这样写的情况下动态获取它们。
答案 0 :(得分:2)
http://developer.android.com/training/sharing/shareaction.html
http://developer.android.com/training/sharing/send.html
这些开发者链接可以帮助您:
这就是我分享基于文本的东西的方式:
String text = "this is some text i want to share";
Intent sharingIntent = new Intent(android.content.Intent.ACTION_SEND);
sharingIntent.setType("text/plain");
sharingIntent.putExtra(android.content.Intent.EXTRA_SUBJECT, "Subject");
sharingIntent.putExtra(android.content.Intent.EXTRA_TEXT, text);
startActivity(Intent.createChooser(sharingIntent, "Title"));