Posting a Text Status using Facebook API in Android - The simplest method


  1. xpl0iter

    xpl0iter New Member

    0 down vote favorite


    I have been searching a lot to find a way to do this. But nothing seems to be working for me. Can someone please help in doing this?

    This is my image button for facebook status post:

    This is my mainactivity.java file's corresponding part:

    [HIGH]public class MainActivity extends FacebookActivity {

    private static final String APP_ID = "XXXXXXXXXXXXXXX";

    @Override
    protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);
    }

    . . . . . . .

    public void shareOnFacebook(View v) {
    //mfacebook = new Facebook("XXXXXXXXXXXXXXX");
    postOnWall("Testing from Android");
    }

    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
    // Inflate the menu; this adds items to the action bar if it is present.
    getMenuInflater().inflate(R.menu.activity_main, menu);
    return true;
    }
    }[/HIGH]Can someone point in the right direction? :)

    Advertisement
  2. xpl0iter

    xpl0iter New Member

  3. jonbonazza

    jonbonazza Well-Known Member

Share This Page