예제 #1
0
        static void ExecuteGraphRequest(SDK.AccessToken accessToken)
        {
            var request = SDK.GraphRequest.NewMeRequest(accessToken, new GraphCallback());
            var bundle  = new Bundle();

            bundle.PutString("fields", CurrentParameters.ToString(","));
            request.Parameters = bundle;
            request.ExecuteAsync();
        }
예제 #2
0
 static void GetGraphData(SDK.AccessToken accessToken)
 {
     if (accessToken.IsExpired)
     {
         SDK.AccessToken.RefreshCurrentAccessTokenAsync(new AccessTokeCallback());
     }
     else
     {
         ExecuteGraphRequest(accessToken);
     }
 }
예제 #3
0
 public void OnTokenRefreshed(SDK.AccessToken accessToken)
 {
     SDK.GraphRequest.NewMeRequest(accessToken, new GraphCallback());
 }
        /*public AccessToken getFacebookAccessToken()
         * {
         *  return Xamarin.Facebook.AccessToken.CurrentAccessToken;
         * }*/

        public bool isLoggedIn()
        {
            Xamarin.Facebook.AccessToken accessToken = Xamarin.Facebook.AccessToken.CurrentAccessToken;
            return(accessToken != null);
        }