How to publish status in facebook timeline?

2

I made an app in facebook and got the app_secret I finally got everything, the goal is for the user to publish in his own timeline however, I can even publish but only in my app and with the login of the app, when I run the application with another user until loga but not msg, I'm using facebook4j, the question is is there any configuration to do in graph api beyond the default or do I have to change the code below?

Facebook facebook = new FacebookFactory().getInstance();
    facebook.setOAuthAppId("MEU ID", "MEU APP_SECRET");
    try {

        facebook.getOAuthAccessToken("O MEU TOKEN DA APLICAÇÃO");

    } catch (FacebookException e) {
        // TODO Auto-generated catch block
        e.printStackTrace();
    }
    facebook.setOAuthPermissions("email,publish_actions");          
    ConfigurationBuilder confBuilder = new ConfigurationBuilder();
    confBuilder.setDebugEnabled(true);
    confBuilder.setJSONStoreEnabled(true);

    confBuilder.build();

    request.getSession().setAttribute("facebook", facebook);

    StringBuffer callbackURL = request.getRequestURL();
    int index = callbackURL.lastIndexOf("/");
    callbackURL.replace(index, callbackURL.length(), "").append("/callback");
    response.sendRedirect(facebook.getOAuthAuthorizationURL(callbackURL.toString()));
}
    
asked by anonymous 30.09.2015 / 20:23

0 answers