在移动社交分享 [英] Social sharing on mobile

查看:140
本文介绍了在移动社交分享的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在一个网站上,人们可以使用一个社会共享的JavaScript库,如前页,以便提出共享按钮的用户无需编程,一切从头开始。

On a website, one can use a social sharing javascript library like addthis in order to propose share buttons to the user without having to program everything from scratch.

你知道任何库直接做同样的事情Android应用程序里面?

Do you know any library doing the same sort of thing directly inside an android application ?

推荐答案

在Android上,我们有意图这一点。 如果你想给用户一个机会来分享的东西,你能火起来像这样的意图,例如:

On Android we have Intents for this. If you like to give the user an opportunity to share something, you can fire up an intent like this for example:

Intent share = new Intent(Intent.ACTION_SEND);
share.setType("image/jpeg") // might be text, sound, whatever
share.putExtra(Intent.EXTRA_STREAM, pathToPicture);
startActivity(Intent.createChooser(share, "share"));

这篇关于在移动社交分享的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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