IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

Développement iOS Discussion :

connexion avec facebook


Sujet :

Développement iOS

  1. #1
    Membre régulier
    Profil pro
    Inscrit en
    Octobre 2009
    Messages
    226
    Détails du profil
    Informations personnelles :
    Localisation : Belgique

    Informations forums :
    Inscription : Octobre 2009
    Messages : 226
    Points : 72
    Points
    72
    Par défaut connexion avec facebook
    bonjour,
    j'ai un souci lorsque j'essaye qu'un utilisateur se connecte via facebook.

    voici mon code source :

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    //
    //  ViewController.swift
    //  FoodTracker
    //
    //  Created by michel lammens on 13/10/15.
    //  Copyright © 2015 michel lammens. All rights reserved.
    //
    
    import UIKit
    import FBSDKCoreKit
    import FBSDKLoginKit
    
    class ViewController: UIViewController, FBSDKLoginButtonDelegate {
    
        override func viewDidLoad() {
            super.viewDidLoad()
            
            if(FBSDKAccessToken.currentAccessToken()==nil){
                print("Not logged in ...")
            }else{
                print("login in")
            }
            
            var loginButton = FBSDKLoginButton()
            loginButton.readPermissions = ["public_profile","email","user_friends"]
            loginButton.center = self.view.center
            
            loginButton.delegate = self
            
            self.view.addSubview(loginButton)
        }
        
        //Mark: -Facebook login
        
        func loginButton(loginButton: FBSDKLoginButton!, didCompleteWithResult result: FBSDKLoginManagerLoginResult!, error: NSError!) {
            if error == nil
            {
                print("login complete.")
                self.performSegueWithIdentifier("showNew", sender: self)
            }
            else
            {
                 print(error.localizedDescription)
            }
        }
        
        func loginButtonDidLogOut(loginButton: FBSDKLoginButton!) {
          print("user logged out ...")
        }
    
    }
    //
    // AppDelegate.swift
    // FoodTracker
    //
    // Created by michel lammens on 11/10/15.
    // Copyright © 2015 michel lammens. All rights reserved.
    //

    import UIKit
    import FBSDKLoginKit

    @UIApplicationMain
    class AppDelegate: UIResponder, UIApplicationDelegate {

    var window: UIWindow?



    func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
    // Override point for customization after application launch.
    return FBSDKApplicationDelegate.sharedInstance().application(application, didFinishLaunchingWithOptions: launchOptions)
    }




    func application(application: UIApplication, openURL url: NSURL, sourceApplication: String?,annotation: AnyObject) -> Bool {
    return FBSDKApplicationDelegate.sharedInstance().application(application, openURL: url,
    sourceApplication: sourceApplication, annotation: annotation)
    }

    func applicationWillResignActive(application: UIApplication) {
    // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
    // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game.
    }

    func applicationDidEnterBackground(application: UIApplication) {
    // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
    // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
    }

    func applicationWillEnterForeground(application: UIApplication) {
    // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background.
    }

    func applicationDidBecomeActive(application: UIApplication) {
    // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
    }

    func applicationWillTerminate(application: UIApplication) {
    // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
    }


    }



    voici le message d'erreure peros je comprend pas bien

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    FoodTracker`FoodTracker.ViewController.init (FoodTracker.ViewController.Type)(coder : ObjectiveC.NSCoder) -> Swift.Optional<FoodTracker.ViewController>:
        0x10f719ff0 <+0>:   pushq  %rbp
        0x10f719ff1 <+1>:   movq   %rsp, %rbp
        0x10f719ff4 <+4>:   subq   $0x50, %rsp
        0x10f719ff8 <+8>:   movq   %rdi, -0x10(%rbp)
        0x10f719ffc <+12>:  movq   %rsi, -0x8(%rbp)
    ->  0x10f71a000 <+16>:  movq   $0x0, -0x8(%rbp)
        0x10f71a008 <+24>:  movq   %rdi, -0x28(%rbp)
        0x10f71a00c <+28>:  movq   %rsi, -0x30(%rbp)
        0x10f71a010 <+32>:  callq  0x10f719730               ; type metadata accessor for FoodTracker.ViewController
        0x10f71a015 <+37>:  leaq   -0x20(%rbp), %rdi
        0x10f71a019 <+41>:  movq   -0x30(%rbp), %rsi
        0x10f71a01d <+45>:  movq   %rsi, -0x20(%rbp)
        0x10f71a021 <+49>:  movq   %rax, -0x18(%rbp)
        0x10f71a025 <+53>:  movq   0x73edc(%rip), %rsi       ; "initWithCoder:"
        0x10f71a02c <+60>:  movq   -0x28(%rbp), %rax
        0x10f71a030 <+64>:  movq   %rax, %rdx
        0x10f71a033 <+67>:  callq  0x10f75bd40               ; symbol stub for: objc_msgSendSuper2
        0x10f71a038 <+72>:  cmpq   $0x0, %rax
        0x10f71a03e <+78>:  sete   %cl
        0x10f71a041 <+81>:  xorb   $0x1, %cl
        0x10f71a044 <+84>:  testb  $0x1, %cl
        0x10f71a047 <+87>:  movq   %rax, -0x38(%rbp)
        0x10f71a04b <+91>:  jne    0x10f71a04f               ; <+95> at ViewController.swift
        0x10f71a04d <+93>:  jmp    0x10f71a083               ; <+147> at ViewController.swift
        0x10f71a04f <+95>:  movq   -0x38(%rbp), %rax
        0x10f71a053 <+99>:  movq   %rax, -0x8(%rbp)
        0x10f71a057 <+103>: movq   %rax, %rdi
        0x10f71a05a <+106>: movq   %rax, -0x40(%rbp)
        0x10f71a05e <+110>: callq  0x10f75bd52               ; symbol stub for: objc_retain
        0x10f71a063 <+115>: movq   -0x28(%rbp), %rdi
        0x10f71a067 <+119>: movq   %rax, -0x48(%rbp)
        0x10f71a06b <+123>: callq  0x10f75bd4c               ; symbol stub for: objc_release
        0x10f71a070 <+128>: movq   -0x40(%rbp), %rdi
        0x10f71a074 <+132>: callq  0x10f75bd4c               ; symbol stub for: objc_release
        0x10f71a079 <+137>: movq   -0x40(%rbp), %rax
        0x10f71a07d <+141>: movq   %rax, -0x50(%rbp)
        0x10f71a081 <+145>: jmp    0x10f71a09d               ; <+173> at ViewController.swift
        0x10f71a083 <+147>: movq   -0x28(%rbp), %rdi
        0x10f71a087 <+151>: callq  0x10f75bd4c               ; symbol stub for: objc_release
        0x10f71a08c <+156>: xorl   %eax, %eax
        0x10f71a08e <+158>: movl   %eax, %edi
        0x10f71a090 <+160>: callq  0x10f75bd4c               ; symbol stub for: objc_release
        0x10f71a095 <+165>: xorl   %eax, %eax
        0x10f71a097 <+167>: movl   %eax, %edi
        0x10f71a099 <+169>: movq   %rdi, -0x50(%rbp)
        0x10f71a09d <+173>: movq   -0x50(%rbp), %rax
        0x10f71a0a1 <+177>: addq   $0x50, %rsp
        0x10f71a0a5 <+181>: popq   %rbp
        0x10f71a0a6 <+182>: retq
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    2015-10-13 16:00:33.582 FoodTracker[17354:1815986] Unknown class Viewco in Interface Builder file.
    Not logged in ...
    2015-10-13 16:00:33.871 FoodTracker[17354:1816048] NSURLSession/NSURLConnection HTTP load failed (kCFStreamErrorDomainSSL, -9802)
    2015-10-13 16:00:33.875 FoodTracker[17354:1815986] FBSDKLog: WARNING: FBSDK secure network request failed. Please verify you have configured your app for Application Transport Security compatibility described at https://developers.facebook.com/docs/ios/ios9
    2015-10-13 16:00:38.382 FoodTracker[17354:1815986] *** Terminating app due to uncaught exception 'InvalidOperationException', reason: 'App ID not found. Add a string value with your app ID for the key FacebookAppID to the Info.plist or call [FBSDKSettings setAppID:].'
    *** First throw call stack:
    (
    	0   CoreFoundation                      0x000000010e8faf65 __exceptionPreprocess + 165
    	1   libobjc.A.dylib                     0x00000001107b1deb objc_exception_throw + 48
    	2   FoodTracker                         0x000000010e64d99b +[FBSDKInternalUtility validateURLSchemes] + 0
    	3   FoodTracker                         0x000000010e64d9be +[FBSDKInternalUtility validateURLSchemes] + 35
    	4   FoodTracker                         0x000000010e632f40 -[FBSDKLoginManager logInParametersWithPermissions:] + 82
    	5   FoodTracker                         0x000000010e63342d -[FBSDKLoginManager logInWithBehavior:] + 50
    	6   FoodTracker                         0x000000010e6333e5 -[FBSDKLoginManager logInWithPermissions:handler:] + 238
    	7   FoodTracker                         0x000000010e632103 -[FBSDKLoginManager logInWithReadPermissions:fromViewController:handler:] + 257
    	8   FoodTracker                         0x000000010e62ebd1 -[FBSDKLoginButton _buttonPressed:] + 1082
    	9   UIKit                               0x000000010f33c1fa -[UIApplication sendAction:to:from:forEvent:] + 92
    	10  UIKit                               0x000000010f4a0504 -[UIControl sendAction:to:forEvent:] + 67
    	11  UIKit                               0x000000010f4a07d0 -[UIControl _sendActionsForEvents:withEvent:] + 311
    	12  UIKit                               0x000000010f49f906 -[UIControl touchesEnded:withEvent:] + 601
    	13  UIKit                               0x000000010f3a6aa3 -[UIWindow _sendTouchesForEvent:] + 835
    	14  UIKit                               0x000000010f3a7691 -[UIWindow sendEvent:] + 865
    	15  UIKit                               0x000000010f359752 -[UIApplication sendEvent:] + 263
    	16  UIKit                               0x000000010f334fcc _UIApplicationHandleEventQueue + 6693
    	17  CoreFoundation                      0x000000010e8270a1 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
    	18  CoreFoundation                      0x000000010e81cfcc __CFRunLoopDoSources0 + 556
    	19  CoreFoundation                      0x000000010e81c483 __CFRunLoopRun + 867
    	20  CoreFoundation                      0x000000010e81be98 CFRunLoopRunSpecific + 488
    	21  GraphicsServices                    0x0000000113da7ad2 GSEventRunModal + 161
    	22  UIKit                               0x000000010f33a676 UIApplicationMain + 171
    	23  FoodTracker                         0x000000010e62ceed main + 109
    	24  libdyld.dylib                       0x00000001112c992d start + 1
    )
    libc++abi.dylib: terminating with uncaught exception of type NSException
    (lldb)
    merci d'avance
    cordialement , mimi6060

  2. #2
    Membre régulier
    Profil pro
    Inscrit en
    Octobre 2009
    Messages
    226
    Détails du profil
    Informations personnelles :
    Localisation : Belgique

    Informations forums :
    Inscription : Octobre 2009
    Messages : 226
    Points : 72
    Points
    72
    Par défaut
    comment resoudre ceci ?

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    Terminating app due to uncaught exception 'InvalidOperationException', reason: 'fbauth2 is missing from your Info.plist under LSApplicationQueriesSchemes and is required for iOS 9.0'

  3. #3
    Membre du Club
    Profil pro
    Inscrit en
    Décembre 2009
    Messages
    61
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Décembre 2009
    Messages : 61
    Points : 41
    Points
    41
    Par défaut
    As-tu suivi les instructions indiquées ici ? https://developers.facebook.com/docs/ios/ios9

Discussions similaires

  1. [ZF 1.11] connexion avec facebook
    Par yochima dans le forum Zend Framework
    Réponses: 8
    Dernier message: 11/05/2012, 15h37
  2. [ORACLE 10g Linux] Pbm de connexion avec un Client winXP
    Par zarbiwayne dans le forum Administration
    Réponses: 26
    Dernier message: 20/08/2004, 22h37
  3. Connexion avec Perl
    Par BARBIER dans le forum PostgreSQL
    Réponses: 1
    Dernier message: 05/05/2004, 14h05
  4. Connexion avec interbase
    Par X Trips dans le forum Autres éditeurs
    Réponses: 5
    Dernier message: 30/03/2004, 13h15
  5. [WSAD5] Connexion avec une base Lotus
    Par mickey dans le forum Eclipse Java
    Réponses: 1
    Dernier message: 11/03/2004, 08h37

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo