0

I used the following code to invite facebook friends to my app,

private void sendRequestDialog() {
        Bundle params = new Bundle();
        params.putString("message", "Receipt of Defeat");
        Session session = Session.getActiveSession();

        if (session == null) {
            // try to restore from cache
            session = Session.openActiveSessionFromCache(HomePage.this);
        }
        WebDialog requestsDialog = (new WebDialog.RequestsDialogBuilder(
                HomePage.this, session, params)).setOnCompleteListener(
                new OnCompleteListener() {

                    @Override
                    public void onComplete(Bundle values,
                            FacebookException error) {
                        if (error != null) {
                            if (error instanceof FacebookOperationCanceledException) {
                                Toast.makeText(
                                        getApplicationContext()
                                                .getApplicationContext(),
                                        "Request cancelled", Toast.LENGTH_SHORT)
                                        .show();
                            } else {
                                Toast.makeText(
                                        getApplicationContext()
                                                .getApplicationContext(),
                                        "Network Error", Toast.LENGTH_SHORT)
                                        .show();
                            }
                        } else {
                            final String requestId = values
                                    .getString("request");
                            if (requestId != null) {
                                Toast.makeText(
                                        getApplicationContext()
                                                .getApplicationContext(),
                                        "Request sent", Toast.LENGTH_SHORT)
                                        .show();
                            } else {
                                Toast.makeText(
                                        getApplicationContext()
                                                .getApplicationContext(),
                                        "Request cancelled", Toast.LENGTH_SHORT)
                                        .show();
                            }
                        }
                    }

                }).build();
        requestsDialog.show();
    }

On clicking that notification it is not moved to playstore. I want to move that to playstore (My App) I had give the link in "Secure Canvas URL"

Sreejith SP
  • 171
  • 3
  • 22

2 Answers2

0

enter image description here

 Steps:
    1) https://developers.facebook.com/
    2) Select your app
    3) Select Settings from left side panel (Do changes in Basic Tab)
    4) and apply changes according to image 
Riddhi Shah
  • 477
  • 7
  • 26
0

I just turned on "Deep Linking" in developer settings and it worked. Thanks for your time

Sreejith SP
  • 171
  • 3
  • 22