Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8936837
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T10:18:14+00:00 2026-06-15T10:18:14+00:00

In my application I want to log all the error messages along with its

  • 0

In my application I want to log all the error messages along with its error code when FacebookOauthException occurs.but I couldn’t find way to do so.
According to the facebook the exception object contains

     {
  "error": {
    "message": "Error validating access token: Session has expired at unix 
                time SOME_TIME. The current unix time is SOME_TIME.", 
    "type": "OAuthException", 
    "code": 190
    "error_subcode": 463
}

and in c# I am trying to catch exception in the following way :

            try
            {
                FacebookWebClient facebookWebClient = new FacebookWebClient(pAccessToken);
                JsonObject facebookPagesJsonObj = facebookWebClient.Get(@"\me\accounts") as JsonObject;
                JsonArray faceookPagesJsonArray = facebookPagesJsonObj["data"] as JsonArray;
           }

        catch (FacebookApiException facebookException)
        {

            if (facebookException.ErrorType.ToLower().Equals("oauthexception"))
        {
             //want to access error code,error message and error_subcode here.
        }
        }

It would be great if anyone can help me.
Thanks,
Priya

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T10:18:14+00:00Added an answer on June 15, 2026 at 10:18 am

    I’m using PHP, but maybe the exception object is set up the same way. If you include a link to C# SDK docs, that could help too.

    In PHP, the Facebook exception has the getResult() method, which returns an ‘error’ hash with keys ‘message’, ‘type’ and ‘code’.

    So to use:

    $res = facebookException->getResult();
    $error = $res['error'];
    // Now use: $error['code'], $error['type'], $error['message']
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

If I want to log all occurrences of exceptions throughout my application so far,
I want all my applications log to be centralized (ideally in near real-time). We
I have an android application and web-server working together. Now I want user log
I want to create log file for my flex application. That is the file
i need to log each method call in my application. i dont want to
I want to maintain two Log Files in my web-application using apache Log4j.jar: 1)
First of all I want to say that I know its bad to serve
I am using python's standard logging system to log my application. I want to
I have custom error handling defined for my application and it all works wonderfully
I want to use Jersey Client in my Android application. This is the code

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.