- Yes
- Do not use
ShareDialog , use ShareDialog instead, here is a sample code - publish_actions permission is required and your application will be viewed by Facebook.
You can also read this Facebook developer post , which seems to prevent implicit / automatic posting. A warning is displayed to the user if the application has not been viewed.
Edit
Before using ShareApi , first check if the application has the required permission:
private boolean hasPublishPermission() { AccessToken accessToken = AccessToken.getCurrentAccessToken(); return accessToken != null && accessToken.getPermissions().contains("publish_actions"); }
If not, run the following code to request permission:
LoginManager.getInstance().logInWithPublishPermissions( this, Arrays.asList("publish_actions"));
If you use ShareApi without the appropriate permission, it will not be executed and the onError(FacebookException) method will be called if you passed FacebookCallback to ShareApi .
source share