Facebook App Login.

Hey! I am connecting a Test App with Facebook for login. I am using Facebook iOS SDK 4.8.0 and using LoginManager class for login.
i can login successfully in Facebook and get result what i need for. But when i check into my Facebook App installed on my i-Phone i saw it's not logged in there, in actually it is logged-in into safari browser at facebook.com .
i want that when i log in to Facebook through my Test App then it must be logged-in into my Facebook App installed on i-Phone.

code snippet as below:-

        LoginManager manager = new LoginManager ();
            manager.Init ();
            manager.LogInWithReadPermissions (new string[]{ "email"}, (result, error) => {
                if(error!=null){
                    FacebookUser(null, error.ToString());
                    return;
                }else if(result.IsCancelled){
                    return;
                }else {
                    var UserToken = result.Token.TokenString;
                    if(UserToken != null){
                        var dict = new NSDictionary ("email");
                        var graphRequest = new GraphRequest ("/me", dict, UserToken, null, "GET");
                        var requestConnection = new GraphRequestConnection();
                        requestConnection.AddRequest(graphRequest, (connection, results, err) =>
                            {
                                Debug.WriteLine("Success");
                            });

                        requestConnection.Start();
                    }
                }
            });

Answers

Sign In or Register to comment.