So I’m doing this
So I’m trying to post an image to my own wall with tags of friends.
local function onLoginSuccess(friends) local attachment = { message = " ??????. ", source = { baseDir=system.DocumentsDirectory, filename="picture.jpg", type="image" }, message\_tags = friends, } facebook.request( "me/photos", "POST", attachment ) end
But I could not get message_tags format correctly and it bounces.
They say in an obj C, it should be something like this.
"message\_tags": { "18": [{ "id": "##########", "name": "Abc Def", "type": "user", "offset": 18, "length": 7 }], "7": [{ "id": "##########", "name": "AbcD", "type": "user", "offset": 7, "length": 4 }] }
But since Corona doesn’t have arrays and stuff, I couldn’t figure out what would work.
Please help me!