HI,
i also use EasyFacebookConnectSDK.i am not clear about this problem.
i have to simple post my status using android.
Previously i have FaceBook's 1.3 version, i update it , now i have FaceBook
1.6.
In FB 1.3 this code is working fine, but in FB 1.6 its not working and its
open native Facebook application.
i have to just post Status as i do in FB 1.3.
Suggest me..
its my code .
Please help me its urgent
Thanks in advance.

package com.greatapp;

import java.io.IOException;
import java.net.MalformedURLException;

import com.facebook.android.DialogError;
import com.facebook.android.Facebook;
import com.facebook.android.Facebook.DialogListener;
import com.facebook.android.FacebookError;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.widget.Toast;

public class MyGreatActivity extends Activity implements DialogListener{
    /** Called when the activity is first created. */
    Facebook facebook;
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
        System.out.println("facebook started");
      fblogin();
   }
    public void fblogin()
    {
        facebook = new Facebook("122058267888898");
        try {
            facebook.logout(getApplicationContext());
        } catch (MalformedURLException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        } catch (IOException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }
        facebook.authorize(MyGreatActivity.this, new String[] {
"publish_stream",
                "read_stream", "offline_access" }, this);
    }

public void onComplete(Bundle values) {
    if (values.isEmpty()) {
        return;
    }

    if (!values.containsKey("post_id")) {
        try {
            Bundle parameters = new Bundle();
            parameters
                    .putString("message", "is Listening to  " + "facebook
ragga");// the

            facebook.dialog(this, "stream.publish", parameters, this);
        } catch (Exception e) {
            System.out.println(e.getMessage());
        }
    }
}
public void onFacebookError(FacebookError e) {
    // TODO Auto-generated method stub
    showToast("Authentication with Facebook failed!");
    finish();

}
public void onError(DialogError e) {
    // TODO Auto-generated method stub
    showToast("Authentication with Facebook failed!");
    finish();

}
public void onCancel() {
    // TODO Auto-generated method stub
    showToast("Authentication with Facebook failed!");
    finish();

}
private void showToast(String message){
    Toast.makeText(getApplicationContext(), message,
Toast.LENGTH_SHORT).show();
}
}





On Sat, Jul 16, 2011 at 4:56 PM, shanmugam nathan <
shanmugam.andr...@gmail.com> wrote:

> Hey gaurav,
>
> Why don't u try with EasyFacebookConnectSDK  its quite simpler for
> beginners.
> But u can find some errors in LogCat but just ignore those coz ur
> final target ll be achieved.
>
>
> Thanks,
> Shanmugam
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to