vozForums
Báo lỗi diễn đàn và theo dõi tình hình khắc phục.

Go Back   vozForums > Máy tính để bàn > Phần mềm > Phát triển Phần mềm


Reply
 
Thread Tools
  #1  
Old 06-08-2012, 23:43
Gtrewq Gtrewq is offline
Member
 
Join Date: 04-2011
Posts: 54
[Gấp] Lập trình .net - liên quan tới facebook :((

Em dùng :
(new WebClient()).DownloadString("http://graph.facebook.com/?ids=http://google.com");
thì nó ra lỗi
System.Net.WebException: The remote server returned an error: (400) Bad Request.
Với các link bình thường như http://vozforums.com nói chung là ngoại trừ facebook thì nó vẫn get được source về bình thường
Không hiểu sao facebook nó không get được các thím ai biết giúp e với
e ngàn lần cảm tạ :(
Reply With Quote
  #2  
Old 07-08-2012, 05:05
duythinht duythinht is offline
K.I.A
 
Join Date: 09-2011
Posts: 969
Re: [Gấp] Lập trình .net - liên quan tới facebook :((

facebook bây giờ khi vào nó đâu có sẵn nội dung đâu, khi dùng trình duyệt đăng nhập vào, thì tiếp đó nó mới dùng ajax để get tiếp dữ liệu về đâu còn là static html đâu mà đòi dùng webclient get source về.
Reply With Quote
  #3  
Old 10-08-2012, 03:32
maestro09's Avatar
maestro09 maestro09 is offline
Senior Member
 
Join Date: 01-2012
Posts: 1,057
Re: [Gấp] Lập trình .net - liên quan tới facebook :((

bác chủ thread vẫn chưa làm đc à

bác gì ở trên nói đúng rồi đấy. dữ liệu nó live update mà. mà các source-code bác chủ thread dùng thì nhiều ng cũng bị lỗi y chang vậy rồi. bác tìm cách khác xem sao.
Reply With Quote
  #4  
Old 10-08-2012, 05:07
LordTNT LordTNT is offline
Member
 
Join Date: 03-2012
Posts: 65
Re: [Gấp] Lập trình .net - liên quan tới facebook :((

cái người ta cần vô là cái graph API của fb mà đâu có liên quan gì tới trang chính của nó -.- cái trang api đó thì chỉ là plain text json thôi

ta thử vô bình thường có bị cản gì đâu :|

Code:
using System;
using System.Net;

namespace TestWeb
{
    class Program
    {
        static void Main(string[] args)
        {
            string a = (new WebClient()).DownloadString("http://graph.facebook.com/?ids=http://google.com");
            Console.WriteLine(a);
        }
    }
}
Code:
{"http:\/\/google.com":{"id":"http:\/\/google.com","shares":4375634}}
Chắc là thằng nhà mạng nó còn cản ko cho vô FB ở VN
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump





All times are GMT +7. The time now is 13:51.


Steam Powered by vBulletin® 0.1 pre-alpha
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.