android - Log in on Facebook: app is misconfigured -
i try write application can log in facebook. use easyfacebooksdk.jar library use api, have problem configuration. post follow image: facebook app have created:
i have obtained key hash in way console:
i put code here in key has field( can't post image because don't have 10 reputation)
this code:
public class mainactivity extends activity implements loginlistener { private fbloginmanager fbmanager; @override public void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); sharefacebook(); } public void sharefacebook() { //change permissions according function want use string permissions[] = { "read_stream", "user_relationship_details", "user_religion_politics", "user_work_history", "user_relationships", "user_interests", "user_likes", "user_location", "user_hometown", "user_education_history", "user_activities", "offline_access" }; //change parameters of application fbmanager = new fbloginmanager(this, r.layout.activity_main, "334014040053829", permissions); if (fbmanager.existssavedfacebook()) { fbmanager.loadfacebook(); } else { fbmanager.login(); } } @override protected void onactivityresult(int requestcode, int resultcode, intent data) { fbmanager.loginsuccess(data); } public void loginfail() { fbmanager.displaytoast("login failed!"); } public void logoutsuccess() { fbmanager.displaytoast("logout success!"); } public void loginsuccess(facebook facebook) { //library use example graphapi graphapi = new graphapi(facebook); user user = new user(); try { user = graphapi.getmyaccountinfo(); graphapi.setstatus("post app"); } catch (easyfacebookerror e) { e.tostring(); } } }
i obtain error in emulator: app misconfigured facebook log in don't understand why... can me?
Comments
Post a Comment