Android和Facebook共享意圖我正在開(kāi)發(fā)一個(gè)Android應(yīng)用程序,我想知道如何使用Android的共享意圖從應(yīng)用程序內(nèi)部更新應(yīng)用程序用戶的狀態(tài)。在瀏覽了Facebook的SDK之后,看起來(lái)這很容易做到,但是我很想讓用戶通過(guò)常規(guī)的共享意圖彈出窗口來(lái)做這件事?見(jiàn)此:我已經(jīng)嘗試了通常的共享意圖代碼,但這似乎不再適用于Facebook。public void invokeShare(Activity activity, String quote, String credit) {
Intent shareIntent = new Intent(android.content.Intent.ACTION_SEND);
shareIntent.setType("text/plain");
shareIntent.putExtra(android.content.Intent.EXTRA_SUBJECT, activity.getString(R.string.share_subject));
shareIntent.putExtra(android.content.Intent.EXTRA_TEXT, "Example text");
activity.startActivity(Intent.createChooser(shareIntent, activity.getString(R.string.share_title)));}更新:在做了更多的調(diào)查之后,它看起來(lái)像是Facebook應(yīng)用程序中的一個(gè)尚未解決的bug!Facebook bug)同時(shí),看起來(lái)我不得不忍受負(fù)面的“分享不起作用!”評(píng)論。干杯Facebook:*(
Android和Facebook共享意圖
慕的地6264312
2019-07-09 12:51:40