1. Check out our companion app, Forums for Android! Download from Google Play

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

Discussion in 'Application Development' started by xpl0iter, Dec 9, 2012.

  1. xpl0iter

    xpl0iter New Member
    Thread Starter
    5

    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
    Thread Starter
    5

  3. jonbonazza

    jonbonazza Well-Known Member
    163

    Jul 13, 2010
    1,934
    458
    163
    Male

Share This Page

Loading...