从机器人发送Facebook的请求不显示信息preVIEW,并且不会发送给朋友 [英] Send Facebook request from android does not show message preview and does not send to friends

查看:288
本文介绍了从机器人发送Facebook的请求不显示信息preVIEW,并且不会发送给朋友的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的Andr​​oid应用程序,Facebook登录和验证后,用户可以将请求发送给他的朋友,邀请他们加入应用程序。此外,我需要知道谁邀请,用户发送的请求后。

In my android app, after the Facebook login and authentication, user is allowed to send the request to his friend to invite them to join the app. Moreover, I need to know who is invited, after the user sends requests.

我的问题如下:


  1. 当用户想要发送请求,消息preVIEW不
    示出在对话框的顶部。

  2. 在当前的邀请按钮,一个黑色的屏幕上盖对话框,用户点击。如果
    轻触黑色封面,它正在消失。

  3. 当用户在发送选择朋友和水龙头,请求不会
    到朋友。

发送查询请求code是如下:

Send request code is as following:

private void sendRequestDialog() {
    Bundle params = new Bundle();
    params.putString("message", "Learn how to make your Android apps social");
    WebDialog requestsDialog = (new WebDialog.RequestsDialogBuilder(FBLoginActivity.this, Session.getActiveSession(), params))
            .setOnCompleteListener(new OnCompleteListener() {

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

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

我跟着Facebook发送请求的实施指南,但我没有得到同样的结果。

I followed the Facebook Send request implementation guide but I am not getting same result.

请注意:

我的应用程序是不是发表在Play商店呢。

My application is not published on Play store yet.

应用程序配置:沙盒禁用,并且还没有提交给Facebook的任何权限和审批(?我想知道发送请求我需要做的)

App configuration on Facebook developer dashboard: Sand box disabled and it has not submitted to the Facebook for any permissions and approval.(I want to know for send request I need to do that?)

我怀疑,我很想念在Facebook上的应用程序仪表板进行一些配置。

I am suspecting that I am missing some configuration on Facebook app dashboard.

我pciated任何帮助AP $ P $。

I am appreciated for any help.

推荐答案

最后,我得到了答案。缺少点从您的应用程序发送请求给朋友提供Facebook的配置,妥善处理请求,没有Facebook的文件中提及。

Finally I got the answer. The missing point for sending request to friend from your app is to provide Facebook configuration to handle request properly which is not mentioned in Facebook documentation.

在Facebook的主页上,前往设置并在Facebook上添加应用程序(添加平台部分),Facebook的分配在Facebook中域的页面一样的 https://apps.facebook.com/Your-name-space ,那么你可以设置你的Canvas URL和Canvas安全网址带来的URL内容到画布上。
(关于如何配置画布URL参考更多信息[这里] [https://devcenter.heroku.com/articles/configuring-your-facebook-app-as-a-canvas-page]

In Facebook dashboard, go the setting and add App on Facebook (Add platform section), facebook allocate a page in Facebook domain like https://apps.facebook.com/Your-name-space, then you could set your Canvas URL and Canvas Secure URL to bring the URL content to the canvas. (for more info about how to configure Canvas URL refer to [this][https://devcenter.heroku.com/articles/configuring-your-facebook-app-as-a-canvas-page]

当所有发送请求给朋友后,朋友收到通知,当点击它,他们会重定向到 https://apps.facebook.com/Your-name-space

After all when send request to friends, friends recieve notification and when click on it they will redirect to https://apps.facebook.com/Your-name-space.

这篇关于从机器人发送Facebook的请求不显示信息preVIEW,并且不会发送给朋友的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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