Facebook 的 Android 分享意图 [英] Android share intent for Facebook

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

问题描述

我对下面的代码有一些问题.此代码适用于电子邮件、消息、Twitter(用于发送文本),但不适用于 Facebook.为什么?

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 的 Android 分享意图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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