Download the Facebook SDK and import it into your project. Then use the following code to log in:
public void sendtoFacebook(){ facebookClient = new Facebook("<Your_APP_ID"); facebookClient.authorize(<Current_class>.this, new AuthorizeListener()); }
Now you need to add the following methods:
class AuthorizeListener implements DialogListener { public void onComplete(Bundle values) { Bundle parameters = new Bundle(); parameters.putString("message", "<Message_you_want_to_send>");
Your application name and icon will be added automatically :)
Galip
source share