0

I am building an a feature where a user can post a status on his wall using our application.

I am done with facebook login and a sample code for posting status on wall. Yet I am facing issue in posting check-in status. I am using place id also that I get to know after doing some googling.

Below is my code for posting on wall

  void shareOnWall() {
    ShareDialog shareDialog = new ShareDialog(this);
    callbackManager = CallbackManager.Factory.create();
    shareDialog.registerCallback(callbackManager, new

            FacebookCallback<Sharer.Result>() {
                @Override
                public void onSuccess(Sharer.Result result) {
                    Log.d(TAG, "onSuccess: ");
                    Toast.makeText(RestaurantDetail.this, "onSuccess", Toast.LENGTH_SHORT).show();
                }

                @Override
                public void onCancel() {
                    Log.d(TAG, "onCancel: ");
                    Toast.makeText(RestaurantDetail.this, "onCancel", Toast.LENGTH_SHORT).show();
                }

                @Override
                public void onError(FacebookException error) {
                    Log.d(TAG, "onError: ");
                    Toast.makeText(RestaurantDetail.this, "onError" + error.toString(), Toast.LENGTH_SHORT).show();
                }
            });

    if (ShareDialog.canShow(ShareLinkContent.class)) {
        ShareLinkContent linkContent = new ShareLinkContent.Builder()
                .setContentTitle("Hello Facebook")
                .setPlaceId("ChIJe9L4I-HI5zsReGojmrSWeUM\n" +
                        "Bandra West, Mumbai, Maharashtra, India")
                .setContentDescription("The 'Hello Facebook' sample  showcases simple Facebook integration")
                .setContentUrl(Uri.parse("http://developers.facebook.com/android"))
                .build();

        shareDialog.show(linkContent);
    }
}

Please help me if someone know how to post check-in status on wall.

Hitesh Matnani
  • 309
  • 1
  • 5
  • 20

0 Answers0