Share using facebook intent in android

I use the following code to share content

Intent intent = new Intent(Intent.ACTION_SEND); intent.setType("text/plain"); intent.putExtra(Intent.EXTRA_TEXT, "The status update text"); startActivity(Intent.createChooser(intent, "Dialog title text")); 

This is normal for email, SMS and everything except Facebook . I will explain the reason, and it seems that this is a mistake on facebook from April, but, unfortunately, no one is fixing it.

However, I found that many applications can still use the chooser intent to quickly call Facebook, such as Google reader. How can they do this?

As I know, we can use the Facebook API, but how can they know that the user selects facebook in chooser and the facebook API is called?

+6
source share
2 answers

According to the latest update to the bug tracker, this is "By Design" and the bug was closed. https://developers.facebook.com/bugs/332619626816423/

So, it seems that this will not be possible through intentions.

+7
source

You can only send a clean url to facebook. This should be a bug in the facebook application.

See the next post for more details.

Share text on Facebook from the Android app via ACTION_SEND


Someone posted this problem in the official framework, but haven't decided yet.

Error 16728 - Android ACTION_SEND is not processing correctly

0
source

Source: https://habr.com/ru/post/904573/


All Articles