Hi there,
I get it simply go not add a movie to my Movie List
my code:
Dim apiKey As String = "475a861fb396xxxxxxxxxxxxxxxx"
Dim sessionID As String = "b47xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
Dim jsonEncoding As String = "{" & vbLf & " ""media_id"": 127585," & vbLf & "}"
Try
Dim client As New Net.WebClient
client.Headers.Add("Content-Type", "application/json")
client.Headers.Add("Accept", "application/json")
client.Headers.Add("api_key", apiKey)
client.Headers.Add("session_id", sessionID)
Dim url As String = "https://api.themoviedb.org/3/list/53d1fbeb0e0a265dea00e3d7/add_item?api_key=" & apiKey & "&session_id=" & sessionID
Dim responsebytes = client.UploadData(url, "POST", System.Text.Encoding.UTF8.GetBytes(jsonEncoding))
Catch webex As WebException
MsgBox(webex.Message)
Catch ex As Exception
MsgBox(ex.Message)
End Try
¿No encuentras una película o serie? Inicia sesión para crearla:
¿Quieres puntuar o añadir este elemento a una lista?
¿No eres miembro?
Contestado por Travis Bell
el 29 de julio de 2014 a las 11:59
Hi Askerion,
What's the specific error (and response) you're receiving from that request?
Contestado por Askerion
el 30 de julio de 2014 a las 02:41
Hi,
I've found the error. Dim jsonEncoding As String = "{" & vbLf & "" "media_id" "127585," & vbLf & "}"
In the Media ID, I had a comma and should not be
Dim jsonEncoding As String = "{" & vbLf & "" "media_id" "127585" & vbLf & "}" that's right
regards