Facebook应用程序请求不通过Facebook Android SDK发送给Facebook的朋友 [英] Facebook App request not sending to Facebook friends through Facebook Android SDK

查看:85
本文介绍了Facebook应用程序请求不通过Facebook Android SDK发送给Facebook的朋友的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想一次向一个朋友以及所有的朋友发送应用请求。我跟随了以下帖子,



如何到发送-APP-请求到朋友,通facebook-android-sdk



对话框/请求/



我可以按照Dev站点中所述获取正确的响应,但问题是我的朋友都没有正在收到应用请求通知。以下是我尝试过的,

  Bundle params = new Bundle(); 
params.putString(FIRST INVITATION,我的邀请来自facebook ..);
params.putString(message,我的第一个应用程序邀请从Android应用程序到Facebook.Lol);
params.putString(app_id,APP_ID);
mFacebook.dialog(this,apprequests,params,new DialogListener(){
@Override
public void onComplete(Bundle values){

Toast toast = Toast.makeText(getApplicationContext(),App request sent,Toast.LENGTH_SHORT);
toast.show();

}

@Override
public void onFacebookError(FacebookError error){

Toast.makeText(getApplicationContext(),Facebook Error:+ error.getMessage(),Toast.LENGTH_SHORT).show();

}

@Override
public void onError(DialogError e){


}

@覆盖
public void onCancel(){

Toast toast = Toast.makeText(getApplicationContext(),应用程序请求已取消,Toast.LENGTH_SHORT);
toast.show() ;
}
});

任何人都可以告诉我这里出了什么问题?



编辑:1



我查看了Facebook SDK附带的Hackbook示例应用程序APP ID,我的应用程序工作正常所以来了知道应用程序设置中必须有一些问题。我还禁用了沙箱模式。为了发送应用程序请求,需要额外的设置?



EDIT-2



经过R& D我来了解真正的问题。编码部分没有问题。我在FB仪表板中的应用程序设置中出错。我需要在应用程序设置中添加一个Facebook哈希键。不管怎样,感谢所有的帮助。

解决方案

D,我来了解编码部分都可以,问题出在于Facebook应用程序设置。我做了以下解决问题,



1.在Native Android App部分中设置必需的字段。



软件包名称:您的Android项目的软件包名称。设置此字段有助于导航到您的应用程序的GooglePlay页面。



ii.Class名称:您的项目的启动器类。



iii.Key Hash :它用于进行安全检查以进行授权您的应用程序。



iv.Facebook登录:应该启用。



strong> v.Deep Linking :应该被启用。



2.在开发者设置中设置Android Key Hash。 / p>

I want to send app request to one friend as well as to all friend at a time.I had followed the following posts,

how-to-send-app-requests-to-friends-through-facebook-android-sdk

dialogs/requests/

I am able to get the correct response as described in the Dev site but the problem is none of my friends are getting the app request notification.Following is what I have tried,

Bundle params = new Bundle();
    params.putString("FIRST INVITATION", "My invitation from facebook..");
    params.putString("message", "My First App Invitation from Android App to facebook.Lol");
    params.putString("app_id",APP_ID);
    mFacebook.dialog(this, "apprequests", params, new DialogListener() {
        @Override
        public void onComplete(Bundle values) {

             Toast toast = Toast.makeText(getApplicationContext(), "App request sent", Toast.LENGTH_SHORT);
                toast.show();

        }

        @Override
        public void onFacebookError(FacebookError error) {

            Toast.makeText(getApplicationContext(), "Facebook Error: " + error.getMessage(), Toast.LENGTH_SHORT).show();

        }

        @Override
        public void onError(DialogError e) {


        }

        @Override
        public void onCancel() {

             Toast toast = Toast.makeText(getApplicationContext(), "App request cancelled", Toast.LENGTH_SHORT);
                toast.show();
        }
    });

can anyone tell me what went wrong here??

EDIT:1

I checked the Hackbook sample Application APP ID which comes with Facebook SDK,and my app works fine So came to know that there must be some problem in app setting.I disabled the sandbox mode too.Is there any extra setting required in order to send app request??

EDIT-2

After some R & D I came to know the real problem.There is no problem in the coding part.I was making mistake in app setting in the FB Dashboard. I need to add a Facebook Hash key in the app setting.Anyways, thanks all for your help.

解决方案

After some R&D, I came to know that the coding part is all ok.The problem lies in the Facebook app setting.I did the following to solve the issue,

1.Set the required fields in the Native Android App section.

i. Package Name: Package name of your android project.Setting this field helps navigating to GooglePlay page of your application.

ii.Class Name: The launcher class of your project. Setting this helps to open the specified page of your app if installed.

iii.Key Hashes: It is used for a security check for authorizing your app.

iv.Facebook Login: should be enabled.

v.Deep Linking: Should be enabled.

2.Set the Android Key Hash in the developer setting.

这篇关于Facebook应用程序请求不通过Facebook Android SDK发送给Facebook的朋友的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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