If you want to send brag or update status form your app, then you need to create an application in your facebook developer account. Then after loggin in your android app which has FB app id you need to invoke a request with publish_post permission. try this..
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 |
private void sendBrag() { Bundle params = new Bundle(); GraphUser currentFBUser = application.getCurrentFBUser(); if (currentFBUser != null) { params.putString("link", your_app_link+""+currentFBUser.getId()); } params.putString("name", "Checkout my new app!"); params.putString("caption", "Come and win me!"); params.putString("description", "friends! Can you beat my score?"); params.putString("picture", PIC_URL); showDialogWithoutNotificationBar("feed", params); } private void showDialogWithoutNotificationBar(String action, Bundle params) { // Create the dialog dialog = new WebDialog.Builder(getActivity(), Session.getActiveSession(), action, params).setOnCompleteListener( new WebDialog.OnCompleteListener() { @Override public void onComplete(Bundle values, FacebookException error) { if (error != null && !(error instanceof FacebookOperationCanceledException)) { ((YOUR_ACTIVITY)getActivity()).showError(getResources().getString(R.string.network_error), false); } dialog = null; dialogAction = null; dialogParams = null; } }).build(); // Hide the notification bar and resize to full screen Window dialog_window = dialog.getWindow(); dialog_window.setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN); // Store the dialog information in attributes dialogAction = action; dialogParams = params; // Show the dialog dialog.show(); } |



