8

Facebook Alert:

Example App (ID ***************) appears to be creating a negative experience on Facebook in violation of our Platform Policies. If you do not make the changes to get your app into compliance, we will be forced to place a restriction on your app.


My Email Inbox:

In working to create a great Platform experience for everyone, we ask developers to ensure the apps they build comply with our Platform Policies. Your app Example App (AppId: ***************) doesn't comply with the following:

Platform Policy 8.1: Verify that you have integrated Login correctly. Your app shouldn't crash or hang during the testing process.

During Login, your Android app is crashing or hanging excessively, creating a broken experience for people trying to use your app. To make sure this flow runs smoothly, check that you've integrated Facebook Login correctly. We recommend that you test Login on all integrations. If you have not already done so, please:


Dependency:

implementation 'com.facebook.android:facebook-login:[5,6)'

AndroidManifest.xml:

<activity android:name="com.facebook.FacebookActivity"
   android:configChanges="keyboard|keyboardHidden|screenLayout|screenSize|orientation"
android:label="@string/app_name" />

<meta-data
android:name="com.facebook.sdk.ApplicationId"
android:value="@string/facebook_app_id" />

onCreate():

@Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
                WindowManager.LayoutParams.FLAG_FULLSCREEN);
        setContentView(R.layout.act_login);

        callbackManager = CallbackManager.Factory.create();

        fb_login_button = findViewById(R.id.fb_login_button);
        fb_login_button.setReadPermissions(Arrays.asList(EMAIL));

        init();
    }

Button onClick:

LoginManager.getInstance().logInWithReadPermissions(this, Arrays.asList("public_profile", "email"));
facebookCallBack();

facebookCallBack() Method:

private void facebookCallBack() {
        fb_login_button.registerCallback(callbackManager, new FacebookCallback<LoginResult>() {
            @Override
            public void onSuccess(LoginResult loginResult) {

                //AccessToken accessToken = loginResult.getAccessToken();
                getUserDetails(loginResult);

            }

            @Override
            public void onCancel() {
                Log.print("FB= " + "onCancel");
            }

            @Override
            public void onError(FacebookException exception) {
                Log.print("FB= " + "onError" + exception.toString());
            }
        });
    }

getUserDetails(loginResult) Method:

protected void getUserDetails(LoginResult loginResult) {
        GraphRequest data_request = GraphRequest.newMeRequest(
                loginResult.getAccessToken(),
                new GraphRequest.GraphJSONObjectCallback() {
                    @Override
                    public void onCompleted(
                            JSONObject json_object,
                            GraphResponse responseg) {
                        try {
                            //get my response here
                        } catch (Exception e) {
                            e.printStackTrace();
                        }
                    }
                });
        Bundle permission_param = new Bundle();
        permission_param.putString("fields", "id, name, email, first_name, last_name");
        data_request.setParameters(permission_param);
        data_request.executeAsync();
    }

I trying to resolve this issue before 2 to 3 months ago. but still my app is restricted by facebook.

Anyone have solution for that please help me immediately.

Joker
  • 796
  • 1
  • 8
  • 24
  • During Login, your Android app is crashing or hanging excessively, creating a broken experience for people trying to use your app. this clearly tell you app performance is low, try to fix that and they will approve your app – Lakhwinder Singh Aug 29 '19 at 10:18
  • I try every thing and my app work perfect. i'll send video to facebook but still this alert come every day. And during testing process there is no hang and crashing @LakhwinderSingh – Joker Aug 29 '19 at 10:20
  • if it works on your phone, it does not mean it works on all others – Vladyslav Matviienko Aug 29 '19 at 10:23
  • 1
    @VladyslavMatviienko Why not. for that i can send this build to every my connected person and there is no any crashing or hang during login time. and my app is in beta release. – Joker Aug 29 '19 at 10:25
  • Which type of information you want. becoz i can follow facebook official **[doc](https://developers.facebook.com/docs/facebook-login/android/?sdk=fbsdk)** for implementation. and dependency i can update in my question. @a_local_nobody – Joker Aug 29 '19 at 10:37
  • Okay buddy i can update my question in couple of minute. @a_local_nobody – Joker Aug 29 '19 at 10:41
  • 2
    I update my question with my latest code @a_local_nobody. – Joker Aug 29 '19 at 10:58
  • 3
    Issue resolve after following this **[Link](https://stackoverflow.com/questions/39051517/login-error-there-is-an-error-in-logging-you-into-this-application-please-try)**. Follow **@SumiSadiq** answer. – Joker Oct 21 '19 at 10:36
  • @Joker share your ans with us Thank you! – Hardik Vasani Jan 25 '20 at 12:50
  • we are also experiencing same issue, did u resolve this issue ? and did facebook stopped service ? – Sadanand Sep 22 '21 at 09:21

0 Answers0