Search code examples
iosfacebookunity-game-engineprime31local-system-account

prime31. SocialNetwork iOs. Check system account is present


I use SocialNetworkPlugin for iOs by Prime31 (here)
I want to use login to Fb with SystemAccount if present, but when I haven't it on device - I can't login and take Exception code 308.
I have other login logic but I need use it only when I haven't system account.
Can I check system account for Facebook before first login?

upd: If you can write in c# please.


Solution

  • To detect about the system account for the Facebook in ios you can use :

    if([SLComposeViewController isAvailableForServiceType:SLServiceTypeFacebook]) 
    {
    
    //user is already logged in using iOS integrated FB a/c
    
    }
    else
    {
    
    //user is not logged in
    
    }
    

    And ss per your given link for SocialNetworkPlugin Prime[31] you can use :

    // Checks to see if the user is using a version of iOS that supports the Facebook composer and if they have an account setup 
    
    public static bool canUserUseFacebookComposer()