locked
WebControl and Facebook native client RRS feed

  • Question

  • Hello,

    So I've been working on making a new native client for Facebook on windows mobile and I hit a small snag.
    Apparently it's against FB policy to authorize a user using a custom process (like the one I have implemented) and that all authorizations must be done using their site.  This is all fine and dandy, but I cannot seem to get the WebControl to render the facebook page.

    The process I am currently using involves HttpWebRequests and HttpWebResponses (with a custom wrapper to handle cookies) to POST and GET all the data to and from the Facebook server.  The process works great but it might be against FB policy so I need to find another solution.  I've tried to contact facebook, but they haven't replied with whether or not my current process is or is not in violation, so I'm just preparing for the worst right now

    The WebControl solution that I've been working on for the past little while is simply a control dragged onto a new form and the URL set to the correct URI.  I figured that would be good enough, but nothing showed up when I ran the app, so in the Form CTOR I added "wbLogin.Navigate(url)".  This also did nothing. 

    My last attempt involved setting the DocumentText manually.  I used my same HttpWebRequest wrapper to download the HTML from the URL and set the text
    ex: wbLogin.DocumentText = WebDownloader.DownloadHTML(url);
    This worked in downloading the first page, but then when I click on any link, I get a bunch of [] and ASCII symbols. 

    I would like to handle all the Http requests and responses and just manually set the DocumentText of the WebBrowser, but how do I capture all of the requests and detect what buttons were pressed/text inputed into boxes, etc?  Is there a better solution? 

    Wednesday, May 26, 2010 5:01 PM

Answers

  • Hi joe,

    As facebook feedback, I think you can use webbrowser.Navigate method to load the login page, for more information:
    http://msdn.microsoft.com/en-us/library/ms161352(VS.85).aspx

    If it doesn't work, I suggest you contact facebook again to get further solution.

     

    Best regards,
    Guang-Ming Bian - MSFT


    Please remember to mark the replies as answers if they help and unmark them if they provide no help
    Wednesday, June 2, 2010 2:58 AM

All replies

  • Hi joe,

    As far as I know, we can't catpure the request, because we set the document text manually. I suggest you contact Facebook to get a client.

     

     

    Best regards,
    Guang-Ming Bian - MSFT


    Please remember to mark the replies as answers if they help and unmark them if they provide no help
    Monday, May 31, 2010 6:18 AM
  • I have contacted facebook.  They said to use the WebBrowser object to handle all of the authentication.  But I can't load any of the pages from Facebook with the WebBrowser object.

    All I need to do is show the login facebook page, then the a page that says "Accept or Reject this application" and that's all.  What would be the best solution?

    Monday, May 31, 2010 4:34 PM
  • Hi joe,

    As facebook feedback, I think you can use webbrowser.Navigate method to load the login page, for more information:
    http://msdn.microsoft.com/en-us/library/ms161352(VS.85).aspx

    If it doesn't work, I suggest you contact facebook again to get further solution.

     

    Best regards,
    Guang-Ming Bian - MSFT


    Please remember to mark the replies as answers if they help and unmark them if they provide no help
    Wednesday, June 2, 2010 2:58 AM