update my Facebook status with the android Facebook API (Version 3.0+)

I have been up all night trying to figure out a way to update my Facebook status with the android facebook API (Version 3.0+). I see a lot of posts about this but there all old and use facebook API's 2.0 or less and are now depreciated. I just need a simple example about a simple request and execute (from what I understand that is what you have to do I just can never get it to work. I am not sure if I have to give permissions first or what.

This is what I have tried (does not work):

public void facebook()
{

    // start Facebook Login
    Session.openActiveSession(this, true, new Session.StatusCallback() {

        // callback when session changes state
        public void call(
            final Session session,
            SessionState state,
            Exception exception)
        {
            if (session.isOpened())
            {

                Request.newStatusUpdateRequest(
                    session,
                    "yolo!",
                    new Request.Callback() {

                        public void onCompleted(Response response)
                        {
                                 response.getRequest().executeAsync().execute(null);
                        }

                    });
            }
        }

    });

}

Answers


public void updateMyStatus(){

    Session.openActiveSession(MainActivity.this,true,new StatusCallback(){
        @Override
        public void call(Session session, SessionState state, Exception exception){

            if (session.isOpened()){

                Request.executeStatusUpdateRequestAsync(
                        session,
                        "Hello Social Networking Site",
                        new Request.Callback() 
                {
                    @Override
                    public void onCompleted(Response response) 
                    {
                        Toast.makeText(MainActivity.this,"Status updated",Toast.LENGTH_SHORT).show();
                    }
                });

            }
        }
    });
}

Need Your Help

Boost Threads with CLR

multithreading boost c++-cli clr boost-thread

Using Visual Studio 2008 and Boost Libraries 1.46.1 I want to compile and link the following with the /CLR flag:

Understanding NSRunLoop

ios objective-c cocoa-touch nsrunloop

Can anyone explain for what is NSRunLoop? so as I know NSRunLoop is a something connected with NSThread right? So assume I create a Thread like