I want to post a picture on facebook timeline. I am using LoginButton to set up the permission of publish_actions.But I got error message
"com.facebook.FacebookException: Cannot pass a publish or manage permission (publish_actions) to a request for read authorization."
Does any one know how to set the permission in LoginButton?
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
uiHelper = new UiLifecycleHelper(this, callback);
uiHelper.onCreate(savedInstanceState);
LoginButton loginButton = (LoginButton) findViewById(R.id.loginButton);
loginButton.setReadPermissions(Arrays.asList
("publish_actions","user_friends", "email" , "user_photos" ));
loginButton.setTextColor(Color.TRANSPARENT);
loginButton.setCompoundDrawablesWithIntrinsicBounds(0,0,0,0);
loginButton.setBackgroundResource(R.drawable.fb);
}
Any suggestion will be appreciated.