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(); }
static void GetGraphData(SDK.AccessToken accessToken) { if (accessToken.IsExpired) { SDK.AccessToken.RefreshCurrentAccessTokenAsync(new AccessTokeCallback()); } else { ExecuteGraphRequest(accessToken); } }
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); }