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 8681795
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T21:36:07+00:00 2026-06-12T21:36:07+00:00

I’m trying to get the current facebook user for a silverlight game that is

  • 0

I’m trying to get the current facebook user for a silverlight game that is not hosted in a .NET page, just an html page. The silverlight game will use their id as a credential for submitting a highscore.

I don’t want them to login to Facebook using my app. I want them to login to facebook outside of my app. Then my app checks using .Get(“me”) of the Graph API. However, .Get(“me”) always returns null. Even if the facebookClient has an App access token or appid+secret.

I’m using the C# facebook sdk version 5.4.1.0 (for SL4 support).

This is how I try to do it using appid+secret:

        var app = new Facebook.FacebookClient(appId, appSecret);
        app.GetCompleted += new EventHandler<Facebook.FacebookApiEventArgs>(app_GetCompleted);
        app.GetAsync("me");
    }

    void app_GetCompleted(object sender, Facebook.FacebookApiEventArgs e)
    {
        //the value of me below is always null
        var me = e.GetResultData() as IDictionary<string, object>;
        string id = (string)me["id"];
    }

According to other sites the Apps access token should be more than enough to get the id of the current facebook user:

  • Facebook C# SDK Get Current User
  • http://developers.facebook.com/docs/reference/api/user/
  • Facebook C# sdk – Does the FacebookApp.Get("me") access to Facebook or just to cookie?
  • What is the best way to get the UserId of the current user
  • Facebook C# SDK and Access Token

What am I doing wrong/misunderstanding to get the current facebook users id?

Edit: debug info

Fiddler2 result 404:

  "message": "(#803) Some of the aliases you requested do not exist: clientaccesspolicy.xml",
  "type": "OAuthException",
  "code": 803

Fiddler2 result 400:

  "message": "An active access token must be used to query information about the current user.",
  "type": "OAuthException",
  "code": 2500

FacebookApiEventArgs e.Error.Message:

Value cannot be null.  Parameter name: stream

FacebookApiEventArgs e.Error.StackTrace:

at System.IO.StreamReader..ctor(Stream stream, Encoding encoding, Boolean detectEncodingFromByteOrderMarks, Int32 bufferSize, Boolean leaveOpen)
   at System.IO.StreamReader..ctor(Stream stream)
   at Facebook.FacebookClient.ProcessResponse(HttpHelper httpHelper, Stream responseStream, Type resultType, String& responseStr, Exception& exception, Boolean& cancelled)
  • 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-12T21:36:09+00:00Added an answer on June 12, 2026 at 9:36 pm

    Using Facebook C# sdk:

    string signedRequest = Request.Form["signed_request"];
    var DecodedSignedRequest = FacebookSignedRequest.Parse(Facebook.Web.FacebookWebContext.Current.Settings.AppSecret, signedRequest);
    dynamic SignedRequestData = DecodedSignedRequest.Data;
    accessToken = (String)SignedRequestData.oauth_token;
    var app = new FacebookWebClient();
    var me = (IDictionary<string, object>)app.Get("me");
    firstName = (string)me["name"];
    U_Id = (string)me["id"];
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Basically, what I'm trying to create is a page of div tags, each has
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
I need a function that will clean a strings' special characters. I do NOT
I'm trying to create an if statement in PHP that prevents a single post
I'm working with an upstream system that sometimes sends me text destined for HTML/XML
Is it possible to replace javascript w/ HTML if JavaScript is not enabled on
I'm new to using the Perl treebuilder module for HTML parsing and can't figure

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.