Facebook SDK for Xamarin.iOS login return issue -


i'm trying use facebook sdk xamarin.ios(the 1 facebook, not octorcurve) users authed on app.

i've followed sample comes component store. sample works i'm stuck after login/permissions without firing events notify viewcontroller have user logged in. have set plist file app name, id, , url schema requested facebook sdk. so, code is:

note i'm not creating ui code. have .xib ib file ui , yes, added view fbloginview , set custom class fbloginview.

appdelegate.cs(omitted rest of code brevity):

public override bool finishedlaunching (uiapplication app, nsdictionary options) {     // create new window instance based on screen size     window = new uiwindow (uiscreen.mainscreen.bounds);      viewcontroller = new loginviewcontroller ();     navcontroller = new uinavigationcontroller (viewcontroller);      window.rootviewcontroller = navcontroller;     window.makekeyandvisible ();      return true; }  public override bool openurl (uiapplication application, nsurl url, string sourceapplication, nsobject annotation) {     return fbsession.activesession.handleopenurl(url); }  public override void onactivated (uiapplication application) {     fbsession.activesession.handledidbecomeactive(); } 

loginviewcontroller.cs(the controller nib file):

public override void viewdidload () {     base.viewdidload ();     loginview = btnlogin fbloginview;     loginview.readpermissions = new string[] { "email"  };     loginview.publishpermissions = new string[]{ "publish_actions", "publish_stream", "manage_pages" };      loginview.defaultaudience = fbsessiondefaultaudience.everyone;      loginview.showingloggedinuser += (sender, e) =>          {             var = e;         };      loginview.fetcheduserinfo += (sender, e) =>          {             user = e.user;         }; } 

so, whis code have 2 issues:

  1. note i'm casting btnlogin fbloginview since idk how set outlet on interface builder use right type of fbloginview... type wasnt found when i'm adding outlet in .h file. created uiview , did cast on code. cast valid , still working, since permissions i'm passing being asked user authorisation @ consent fb screen.

  2. the 2 events showingloggedinuser , fetcheduserinfo never called , appdelegate never call openurl neither onactivated.

am missing something? need access_token should returned somewhere after login. how it?

i appreciate help.

thanks!

just provide feedback people...

suddenly, after 2 days hitting head agains wall, cleaned project, rebuild , restarted xamarin studio... events fired... no single thing changed , things working...

there weird behaviours unexplained me xamarin work or not, sometime start app, , hangs on "waiting debugger connect..." , nothing happens connecting device while in simulator works fine...

thanks


Comments

Popular posts from this blog

c# - How Configure Devart dotConnect for SQLite Code First? -

java - Copying object fields -

c++ - Clear the memory after returning a vector in a function -