0
if (session == null){
Log.i("dd", "session value in winLoose 1");
session = new Session(this);
Session.setActiveSession(session);
} else if (session.isOpened()) 
        {
        Session.setActiveSession(session);
        } 

            Request.Callback callback = new Request.Callback()
            {
                public void onCompleted(Response response)
                {
                        FacebookRequestError error = response.getError();
                        if (error != null) Log.d("fb","error"); else Log.d("fb","Success"); } };
Request request = Request.newUploadPhotoRequest(session, bitmap, callback);
request.executeAsync();

My session is opened When I run my above code & when I am trying to post my screenshot to FB via this code. Then this code Toast me (#200) requires extended permission publish_actions

NoNaMe
  • 6,020
  • 30
  • 82
  • 110
Luvnish Monga
  • 7,072
  • 3
  • 23
  • 30
  • private static final String PERMISSION = "publish_actions"; like this while login – Android Dev Jun 22 '15 at 09:05
  • http://stackoverflow.com/q/30758641/4990308 try this link – Android Dev Jun 22 '15 at 09:06
  • Please heck out this http://stackoverflow.com/questions/8080255/facebook-publish-action-permission-not-working-for-posting – Rajan Bhavsar Jun 22 '15 at 09:06
  • You need to ask user for publish permission,please refer this document ,https://developers.facebook.com/docs/facebook-login/android/permissions – Divya Jain Jun 22 '15 at 12:25
  • I had found the solution, Facebook do not allow all permissions for developers, So it should be requested to Facebook to provide particular permission via going in status and review in developers console. Facebook will review app first, then after 2-3 days they allow to access that requested permission. – Luvnish Monga Dec 09 '15 at 15:09

3 Answers3

1

I have found my Answer. My app has not permission for publish_actions. So my FB App needs to go in review to Facebook, So that they will permit the permissions for publish_actions. Thank you very much for your efforts

Brian Tompsett - 汤莱恩
  • 5,753
  • 72
  • 57
  • 129
Luvnish Monga
  • 7,072
  • 3
  • 23
  • 30
0
private  final String[] PERMISSIONS = new String[] {
            "publish_actions", "email", "user_birthday","read_stream", "user_photos"
    };

Pass this permissions during Login.

Shoeb Siddique
  • 2,805
  • 1
  • 22
  • 42
0

give permissions when you use findViewById

FacebookSdk.sdkInitialize(getApplicationContext());
CallbackManager callbackManager = CallbackManager.Factory.create();
LoginButton loginButton = (LoginButton) this.findViewById(R.id.login_button);

loginButton.setReadPermissions("publish_actions", "email", "user_birthday");  //Add extra permissions here
Neal Ahluvalia
  • 1,538
  • 1
  • 10
  • 20