そのため、自分のアカウントを使用して、アプリがスコアを facebook に投稿することに成功しました。しかし、リーダーボードの実装に行ったとき、妻のアカウントで遊んでみました。彼女のスコアを送信しようとすると、「リモート サーバーがエラーを返しました: (403) Forbidden」が返されます。鉱山がまだ正しく動作することを確認しました。繰り返し複製できます。
これがWCFサービスです。
<WebGet()>
<OperationContract()> _
Public Function postMyScore(id, score) As String
'post user score using user's id, score and app's access_token
Dim URL As String = "https://graph.facebook.com/" + id + "/scores"
Dim webProxy As New System.Net.WebProxy(proxyURLremoved, True)
Dim appToken = getAuthCode()
Using client As New Net.WebClient
client.Proxy = webProxy
Dim reqparm As New Specialized.NameValueCollection
reqparm.Add("score", score)
reqparm.Add("access_token", appToken)
Dim responsebytes = client.UploadValues(URL, "POST", reqparm)
Dim responsebody = (New Text.UTF8Encoding).GetString(responsebytes)
Return responsebody
End Using
End Function
繰り返しますが、上記は私としてログインしている場合は機能しますが、妻のアカウントを使用してログインしている場合は機能しません
そして、Graph API Explorer を使用して投稿を複製しようとすると、次のエラーが表示されます (これはセキュリティ上の設計によるものである可能性があります)。
{
"error": {
"message": "(#240) Requires a valid user is specified (either via the session or via the API parameter for specifying the user.",
"type": "OAuthException",
"code": 240
}
}