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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T02:21:16+00:00 2026-05-26T02:21:16+00:00

I’ve set up my Silverlight WP7 app to use a WebBrowser Control to allow

  • 0

I’ve set up my Silverlight WP7 app to use a WebBrowser Control to allow users to log into facebook and grant permissions for further actions. After the user has granted permissions, they are redirected to a web page letting them know permissions have been granted.

The chain is as follows:

App -> opens WebBrowser control at web service #1 -> web service redirects to FB -> Permissions granted -> FB redirects to web service #2 which returns a view.

Web services are both within an externally hosted MVC project.

This all works fine, UNLESS the user is not logged into facebook – instead of taking them to the facebook login page as you would expect, I just get an HTTP 500 internal server error and web service #2 is not hit. If the user is logged in, then everything proceeds as it should.

I’ll also mention this ONLY happens on the WP7 device and does not occur in any browser, including IE9, on my laptop.

EDIT: For clarity’s sake, Web browsers on my laptop were tested by setting a breakpoint before my WebBrowser control was called in Visual Studio, I grabbed the Uri I had built there, and pasted it into Chrome, IE9 etc.

I’m not even sure what direction to look in! Also, I’m sure you guys may need more details to aid you with this question – please let me know what else it is you might need and i’ll do my best to provide it.

  • 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-05-26T02:21:17+00:00Added an answer on May 26, 2026 at 2:21 am

    This code causes the problem.

    // Constants.URL_FACEBOOK_LOGIN contains the parameter "display=touch|wap"
    _popUpBrowser.Navigate(new Uri(Constants.URL_FACEBOOK_LOGIN));
    

    This code fixes the problem.

    // Constants.URL_FACEBOOK_LOGIN contains the parameter "display=touch|wap"
    string userAgent = "User-Agent: Mozilla/5.0 (iPhone; U; CPU iPhone OS 4_1 like Mac OS X; en-us) AppleWebKit/532.9 (KHTML, like Gecko) Version/4.0.5 Mobile/8B117 Safari/6531.22.7";
    _popUpBrowser.Navigate(new Uri(Constants.URL_FACEBOOK_LOGIN), null, userAgent);
    

    Why?

    Because Facebook currently has an issue with the Windows Phone 7 User-Agent value and the display parameter values of “touch” and “wap” when they are present in the same request. So simply sending in an alternate User-Agent header when using a WebBrowser control solves the problem for now.

    I hope this helps other Windows Phone 7 developers that encounter the nasty 500 error when interfacing Facebook Graph API.

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

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
I am trying to understand how to use SyndicationItem to display feed which is
this is what i have right now Drawing an RSS feed into the php,
I want use html5's new tag to play a wav file (currently only supported
I have a French site that I want to parse, but am running into
I am currently running into a problem where an element is coming back from
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
We're building an app, our first using Rails 3, and we're having to build
Configuring TinyMCE to allow for tags, based on a customer requirement. My config is
I'm trying to use string.replace('’','') to replace the dreaded weird single-quote character: ’ (aka

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.