0

Im trying to log in with facebook on my application, but when I click the login button it opens a window saying "not logged in"

I am recieve these two errors

E/DataReductionProxySettingListener: No DRP key due to exception:java.lang.ClassNotFoundException: com.android.webview.chromium.Drp
E/SysUtils: ApplicationContext is null in ApplicationStatus

Here is my code:

public class fragment_fb_btn extends Fragment {
...
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
    FacebookSdk.sdkInitialize(getActivity().getApplicationContext());
    callbackManager = CallbackManager.Factory.create();
    View view = inflater.inflate(R.layout.fragment_fb_btn, container, false);
    loginButton = (LoginButton) view.findViewById(R.id.login_button);
    loginButton.setReadPermissions("user_friends");
    loginButton.setFragment(this);
    loginButton.registerCallback(callbackManager, new FacebookCallback<LoginResult>() {
        @Override
        public void onSuccess(LoginResult loginResult) {}

        @Override
        public void onCancel() {}

        @Override
        public void onError(FacebookException exception) {}
    });
    return view;
}
@Override
public void onActivityResult(int requestCode, int resultCode, Intent data) {
    super.onActivityResult(requestCode, resultCode, data);
    callbackManager.onActivityResult(requestCode, resultCode, data);
}

}

Thanks, if anyone could tell me how to fix this I would be very happy

George
  • 485
  • 1
  • 5
  • 13
  • The Log cat you posted is not the exact error for your issue, you copied the system log cat messages, filter your package name with show only current package logs and do debug it – Brendon Jan 23 '16 at 03:26
  • @Brendon There is nothing interesting in them but, okay – George Jan 23 '16 at 03:42
  • Then y u asked a question without an interest? – Brendon Jan 23 '16 at 03:45
  • @Brendon I gave you all the important information, in not going to flood my question with hundreds of line of meaningless console lines- its not going to help anything- those are all the errors – George Jan 23 '16 at 03:53
  • can you possibly share a screenshot of the "not logged in" screen? – Mo1989 Jan 23 '16 at 04:09
  • @Mo1989 It says- title: error. "Not Logging In: You are not logged in. Please log in and try again" – George Jan 23 '16 at 04:39
  • @Bruce check this: http://stackoverflow.com/questions/31879804/you-are-not-logged-in-please-log-in-and-try-again – Mo1989 Jan 23 '16 at 12:05

0 Answers0