Created New Facebook Application for Android publi

2019-02-15 19:54发布

问题:

I am using facebook sdk 3.14(latest updated sdk) and created application for android platform like other old applications which i have added same options and everything.

i want to use share photo feature for that I am using below code to add publish_actions permission. but permission is not getting updated or granted.

** I have checked with other old application which i have created last month which is working fine with same code photo sharing and all is working , permissions also getting add.

But application which i have created today.with that app id I am not able to add permission for publish.

if (session.isOpened()) {
                // We need to get new permissions, then complete the action when
                // we get called back.
                Session.NewPermissionsRequest permission = new NewPermissionsRequest(
                        this, PERMISSION);              
                permission.setCallback(new StatusCallback() {

                    @Override
                    public void call(Session session, SessionState state,
                            Exception exception) {
//session.getPermissions() //here m not getting publish_permission in list
                        Log.e("", "");
                    }
                });
                session.requestNewPublishPermissions(permission);
                return;
            }

i have also tried with samples which is provided with facebook sdk. onActivity result and all are as per facebook sample given in sdk .

any help? ** try to create new facebook application and use that app id.

回答1:

I found the solution for testing facebook application.After 30th April facebook changed some structure regarding roles.For testing some of the permissions like publish_actions , friends related need to add roles in facebook app.Add testers and developer roles in facebook application after adding role(s) i am able to test that sharing image and other things with that added testers or developer id.For live now its required to post application for review process.After login into developer account Open facebook application and check the Roles Menu.