Android SDK好友请求返回“对不起,出了点问题". [英] Android SDK friend request returns "Sorry, something went wrong"

查看:157
本文介绍了Android SDK好友请求返回“对不起,出了点问题".的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用的是Android版Facebook SDK,当我使用以下代码发送好友请求时,出现以下错误:对不起,出了点问题.我们正在努力尽快解决此问题."

I'm using the Facebook SDK for Android and when I send a friend request using the below code, I get the following error: "Sorry, something went wrong. We're working on getting this fixed as soon as we can."

这是我这边还是Facebook上的问题?几天前,这段代码运行良好.它会像往常一样打开一个弹出窗口,其中包含好友请求.但是,当我单击接受时,它将显示错误页面.请帮助我.

Is this a problem on my side or on Facebook's? This code was working perfectly fine a few days ago. It opens up a popup with the friend request as usual. But when I click accept, it shows me the error page. Please help me.

    private void sendRequestDialog(String friendID)
{   
    Bundle params = new Bundle();

    params.putString("id", friendID);

    WebDialog friendDialog = (
            new WebDialog.Builder(context, Session.getActiveSession(), "friends", params))
    .setOnCompleteListener(new OnCompleteListener()
    {
        @Override
        public void onComplete(Bundle values, FacebookException error)
        {
            if(error != null)
            {
                if(error instanceof FacebookOperationCanceledException)
                {
                    Toast.makeText(context, "Friend Request Cancelled", Toast.LENGTH_SHORT).show();
                }
                else
                {
                    //Toast.makeText(getApplication().getApplicationContext(), "Network Error", Toast.LENGTH_SHORT).show();
                }
            }
            else
            {
                final String requestId = values.getString("request");
                if (requestId != null)
                {
                    Toast.makeText(context, "Friend Request Sent", Toast.LENGTH_SHORT).show();

                    removeFriend();
                }
                else
                {
                    Toast.makeText(context, "Friend Request Cancelled", Toast.LENGTH_SHORT).show();
                }
            }   
        }

    })
    .build();
    friendDialog.show();
}

推荐答案

我正在努力解决同一问题.

I was struggling with the same issue.

对我来说,解决方法是仔细检查权限.(名字的姓氏,名字的姓氏,等等不能正常工作)您应该首先删除所有内容,然后仅接收电子邮件",然后相应地添加剩余的权限,这将使其更易于理解.

The workaround for me was to double-check the permissions. (first_name, last_name with name, etc arent working correctly) You should start by removing all and only take "email" and then add the remaining permissions accordingly which will make it easier to understand.

LoginManager.getInstance().logInWithReadPermissions(
        this,
        listOf("email") //, "name", "first_name", "public_profile"
    )

这篇关于Android SDK好友请求返回“对不起,出了点问题".的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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