Reputation: 7752
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
Upvotes: 0
Views: 1213
Reputation: 7752
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
Upvotes: 1
Reputation: 1548
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
Upvotes: 0
Reputation: 2825
private final String[] PERMISSIONS = new String[] {
"publish_actions", "email", "user_birthday","read_stream", "user_photos"
};
Pass this permissions during Login.
Upvotes: 0