我的范围内有电子邮件,我看到该应用程序具有电子邮件权限,但结果中没有电子邮件,但是如果我将资源管理器与应用程序访问令牌一起使用,我会收到电子邮件。这让我发疯,我相信我一切都是正确的。
Return Redirect(String.Format("https://www.facebook.com/dialog/oauth?client_id={0}&scope=email&redirect_uri={1}&state={2}", My.Resources.FacebookApiKey, My.Resources.FacebookRedirectUrl, Session.SessionID))
Dim webRequest As System.Net.HttpWebRequest
Dim targetURI As New Uri(String.Format("https://graph.facebook.com/oauth/access_token?client_id={0}&redirect_uri={1}&client_secret={2}&code={3}&scope=email", My.Resources.FacebookApiKey, My.Resources.FacebookRedirectUrl, My.Resources.FacebookApiSecret, code))
webRequest = DirectCast(System.Net.HttpWebRequest.Create(targetURI), System.Net.HttpWebRequest)
If (webRequest.GetResponse().ContentLength > 0) Then
Dim str As New System.IO.StreamReader(webRequest.GetResponse().GetResponseStream())
reply = str.ReadToEnd
str.Close()
End If
Dim replies As String() = Split(reply, "=")
targetURI = New Uri(String.Format("https://graph.facebook.com/me?access_token={0}", replies(1)))
webRequest = DirectCast(System.Net.HttpWebRequest.Create(targetURI), System.Net.HttpWebRequest)
If (webRequest.GetResponse().ContentLength > 0) Then
Dim str As New System.IO.StreamReader(webRequest.GetResponse().GetResponseStream())
reply = str.ReadToEnd
str.Close()
End If
如果你能发光,我会很高兴。