0
私は、次のコードを実行するたびに、私は例外を取得:400不正な要求 - FacebookのグラフAPI - HttpWebRequestの
コード
Dim url As String = "https://graph.facebook.com/search?q=" & System.Web.HttpUtility.UrlEncode(_sourceData.Rows(i).Item(0).ToString) & "&type=event&limit=5000"
Dim getFullURL As String = (url & Convert.ToString("&access_token=")) + _appToken
Dim stream As New StreamReader(HttpWebRequest.Create(getFullURL).GetResponse().GetResponseStream())
Dim output As String = stream.ReadToEnd()
stream.Close()
例外:
An unhandled exception of type 'System.Net.WebException' occurred in System.dll
Additional information: The remote server returned an error: (400) Bad Request.
をマイ最初に考えたのは、FacebookがそれぞれのAPIアクセストークンの上に実行制限を設定できるということでした;しかし、実行時に 'getFullURL'文字列変数の内容をコピーしてインターネットブラウザに直接貼り付けるとうまくいきます。 Webブラウザにコピー・ペーストすることができれば、トラブルシューティングを続ける方法が非常に悩まされています。
アドバイスをいただければ幸いです。