对于Facebook的Andr​​oid份额意图 [英] Android share intent for Facebook

查看:110
本文介绍了对于Facebook的Andr​​oid份额意图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一些问题,下面code。这code为工作电子邮件,邮件,微博(发送文本),但不为Facebook。为什么呢?

 意向书我=新的意图(android.content.Intent.ACTION_SEND);
i.setType(text / plain的);
i.putExtra(android.content.Intent.EXTRA_SUBJECTScribeAir);
i.putExtra(android.content.Intent.EXTRA_TEXT,ScribeAir有一些很酷的功能,只要使用它......。);
startActivity(Intent.createChooser(我,股份));
 

解决方案

 意向共享=新的意图(android.content.Intent.ACTION_SEND);
            sharing.setClassName(,);
            sharing.setType(text / plain的);
            sharing.putExtra(android.content.Intent.EXTRA_SUBJECT,你好);
            sharing.putExtra(android.content.Intent.EXTRA_TEXTyahoomail);
 

I have some problem with below code. This code is working for email, message, Twitter (for sending the text) but not for Facebook. Why?

Intent i=new Intent(android.content.Intent.ACTION_SEND);
i.setType("text/plain");
i.putExtra(android.content.Intent.EXTRA_SUBJECT,"ScribeAir");
i.putExtra(android.content.Intent.EXTRA_TEXT, "ScribeAir has some cool features. Just use it...");
startActivity(Intent.createChooser(i,"Share"));

解决方案

            Intent sharing = new Intent(android.content.Intent.ACTION_SEND); 
            sharing.setClassName(,);
            sharing.setType("text/plain");
            sharing.putExtra(android.content.Intent.EXTRA_SUBJECT,"hello");
            sharing.putExtra(android.content.Intent.EXTRA_TEXT, "yahoomail");

这篇关于对于Facebook的Andr​​oid份额意图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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