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