Facebook的邀请函 [英] Facebook Invitation

查看:191
本文介绍了Facebook的邀请函的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我用下面的code邀请Facebook上的朋友给我的应用程序,

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();
    }

在点击该通知,它不会移动到Play商店中。我想移动,要Play商店中(我的应用程序),我不得不放弃在安全画布URL

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"

推荐答案

我只是在开发商设置中打开深层链接和它的工作。感谢您的时间

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

这篇关于Facebook的邀请函的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆