Android:以intent.creatChooser显示Facebook应用程序

问题描述:

我试图在单击按钮时显示Facebook应用程序以共享一行文本。现在,选择器实际上工作并显示一堆应用程序,但不是Facebook。不知道是因为ACTION_SEND,但这是我的。谁能帮忙?谢谢。Android:以intent.creatChooser显示Facebook应用程序

public void invite(View view){ 
    Intent sharingIntent = new Intent(Intent.ACTION_SEND); 
    sharingIntent.setType("text/html"); 
    sharingIntent.putExtra(android.content.Intent.EXTRA_TEXT, Html.fromHtml("<p>I just  played Trivia Knowledge on Android. Think you can beat my Score?</p>")); 
    startActivity(Intent.createChooser(sharingIntent,"Invite Friends To Play Trivia Knowledge")); 
} 
+0

推测Facebook不支持通过ACTION_SEND共享HTML。 – CommonsWare 2013-05-02 00:31:34

Facebook不支持html类型的意图。使用text/plain代替。根据政策文件,他们不支持预先填写信息。

Android Intent Sharing Broken

希望这有助于。