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

  • Home
  • SEARCH
  • 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 9003745
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T00:45:02+00:00 2026-06-16T00:45:02+00:00

Friends, I’ve got some problem. I’m using the Facebook C# SDK 6.0.10.0 for the

  • 0

Friends, I’ve got some problem. I’m using the Facebook C# SDK 6.0.10.0 for the first time and I’ve done this to connect my desktop application with facebook. I’ve used the following code…

public partial class FacebookLogin : Form
{
    Uri login_url;
    String redirect_url;
    private FacebookOAuthResult fbAOuthResult;

    public FacebookLogin()
    {
        InitializeComponent();
        fbAOuthResult = new FacebookOAuthResult();
        login_url = new Uri("https://www.facebook.com/dialog/oauth?client_id=" + ConfigurationManager.AppSettings["AppID"] + "&redirect_uri=https://www.facebook.com/connect/login_success.html&scope=user_photos,friends_photos,publish_stream&display=popup&response_type=token");
        webBrowserFB.Navigate(login_url);
    }        

    void webBrowserFB_Navigated(object sender, System.Windows.Forms.WebBrowserNavigatedEventArgs e)
    {
        if(fbAOuthResult.IsSuccess)
        {
            this.DialogResult = DialogResult.OK;
            redirect_url = webBrowserFB.Url.OriginalString;
            MessageBox.Show(redirect_url);
            this.Close();
        }
    }
}

As I read the same from Facebook docs on how to connect a desktop application. But I’m getting the following error…

‘Facebook.FacebookOAuthResult.FacebookOAuthResult()’ is inaccessible due to its protection level

Please help me out in this and if I’ve missed anything anywhere or if my method is not good, you can correct me, direct me in the correct path as I’m still a college student and please provide me with the better code, if possible..:-)

  • 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-16T00:45:02+00:00Added an answer on June 16, 2026 at 12:45 am

    Mr. Ramhound and all friends, I did it without FacebookOAuthResult() method. It was quite simple and it is working too. I dnt understand why don’t you guys online give a simple method to make the task done…
    Here’s the code which I used..

        public FacebookLogin()
        {
            try
            {
                InitializeComponent();
                login_url = new Uri("https://www.facebook.com/dialog/oauth?client_id=" +
                ConfigurationManager.AppSettings["AppID"] +
                "&redirect_uri=https://www.facebook.com/connect/login_success.html" +
                "&scope=user_photos,friends_photos,user_groups,friends_groups,read_friendlists,publish_stream" +
                "&display=popup" +
                "&response_type=token");
                webBrowserFB.Navigate(login_url);
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
    

    Here do remember keeping the display style to “popup” inside the parameters and it will give you the prompt style login display when you navigate it through your web browser control…
    You can add more permissions and even more parameters as required and every detail of it you’ll get from here. Just go through it thoroughly…
    Now how to catch the response if login was succcessful…?
    See the code below…

        void webBrowserFB_Navigated(object sender, System.Windows.Forms.WebBrowserNavigatedEventArgs e)
        {
            try
            {
                if (webBrowserFB.Url.OriginalString.StartsWith("https://www.facebook.com/connect/login_success.html"))
                {
                    redirect_url = webBrowserFB.Url.OriginalString;                    
                    this.DialogResult = System.Windows.Forms.DialogResult.Yes;
                    this.Close();
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
    

    Now you can jus manipulate that redirect_url variable above in the code to manipulate it and get your access token and start doing your job better with Facebook C# SDK…

    I’ll be soon uploading my application as freeware online and will be providing you with links for the same as it is the working example of this code..

    If you guys have anymore queries related to this code, you can ask me here or on my Facebook page which I visit regularly..

    And please I wel come good suggestions as well any improvements or better code than this…

    Note: Here webBrowserFB is the name which I gave to my web browser control

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Friends, I like to know using which version of Android SDK we can develop
Friends, I currently using KStemmer to perform the stemming operations in my application i
friends, i am opening google map application by using intents and URL to google
Friends i am making an application in which i am using Map Activity. Now
Friends can you help me solve this small issue please. I am using opencart
friends, while testing application on eclipse using emulator google map is being displayed properly.
Friends i'm using string builder for generating Passenger List in which i have used
Friends its really giving me a great head ache about the problem I am
friends, i have created custom title bar using following titlebar.xml file with code <?xml
Friends, I have a strange need and cannot think my way through the problem.

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.