Getting Facebook page (using api chart) in asp.net, getting "Unsupported browser" error

I am trying to get a facebook feed (public message) that does not require access to the token. here is the URL https://www.facebook.com/feeds/page.php?format=json&id=1393547494231876 when I launch this in a browser, where id = any facebook page id. it returns the first 25 public messages in json format. but when I ran this in my code to get the json result facebook, return the page with the message "unsupported browser", this is my method. I pass him the facebook page id to receive the messages.

public static String GetPosts(string PageId)
    {
        string id = PageId;
        string apilink = "https://www.facebook.com/feeds/page.php?format=json&id=";
        HttpWebRequest request = WebRequest.Create(apilink + id) as HttpWebRequest;
        request.Method = WebRequestMethods.Http.Get;
        request.Accept = "application/json";
        request.ContentType = "application/json; charset=utf-8";
        // Get response  
        using (HttpWebResponse response = request.GetResponse() as HttpWebResponse)
        {
            // Get the response stream  
            StreamReader reader = new StreamReader(response.GetResponseStream());

            // Console application output  
            String result = reader.ReadToEnd();
            return result;
        }
    }

Here is the result that I get in the return line

.. . - , ?

... , Facebook , . request.UserAgent = ".NET Framework"; .   .

+3
1

... , Facebook , .. request.UserAgent = ".NET Framework"; . .

+4

All Articles