简体   繁体   中英

ShareDialog Facebook in Custom Dialog - Android

I want use ShareDialog of Facebook in Custom Dialog , but when initialize I can't set context value to new ShareDialog.

shareDialog = new ShareDialog(.......); //getContext() not working 

I need way resolve :(

Kindly pass activity context in the builder, as opposed to the getContext. If using in the Activity , use like

shareDialog = new ShareDialog(MyActivity.this);

if using it in a fragment

shareDialog = new ShareDialog(getActivity);

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM