To the channel we have to send the value : \ud83d\udc4d for the emoji "thumbs up”
When we make the channel call
twurl -H ads-api.twitter.com -A “Content-Type: application/json;charset=UTF-8” “/1/accounts/18ce53uo3nm/targeting_criteria” -X POST -d “line_item_id=5qk6h&targeting_type=PHRASE_KEYWORD&targeting_value=\ud83d\udc4d” | python -mjson.tool
It wrongly interprets the value as : \ud83d\udc4d
reponse:
{
“data”: [
{
“account_id”: “18ce53uo3nm”,
“created_at”: “2016-07-20T09:32:17Z”,
“deleted”: false,
“id”: “9dikc4”,
“line_item_id”: “5qk6h”,
“location_type”: “COUNTRY”,
“name”: “United States”,
“targeting_type”: “LOCATION”,
“targeting_value”: “96683cc9126741d1”,
“updated_at”: “2016-07-20T09:32:17Z”
},
{
“account_id”: “18ce53uo3nm”,
“created_at”: “2016-09-23T07:08:39Z”,
“deleted”: false,
“id”: “a2rhp8”,
“line_item_id”: “5qk6h”,
“name”: “\ud83d\udc4d”,
“targeting_type”: “PHRASE_KEYWORD”,
“targeting_value”: “\ud83d\udc4d”,
“updated_at”: “2016-09-23T07:08:39Z”
}
],
“data_type”: “targeting_criterion”,
“next_cursor”: null,
“request”: {
“params”: {
“account_id”: “18ce53uo3nm”,
“line_item_id”: “5qk6h”
}
},
“total_count”: 2
}
I have tried variations : /\ud83d/\udc4d
and \ud83d\udc4d
but it always interprets it wrongly as \ud83d\udc4d.
I googled and found a batch call solution :
twurl -H ads-api.twitter.com -X PUT -A “Content-Type: application/json;charset=UTF-8” “/1/accounts/18ce53uo3nm/targeting_criteria?line_item_id=5qk6h” -d ‘[{“operation_type”: “Update”, “params”: {“line_item_id”: “5qk6h”, “targeting_type”: “BROAD_KEYWORD”, “targeting_value”: “\ud83d\udc4d”}}]’ | python -mjson.tool
But I want the non batched call to work. Is this a bug on the Twitter side or in my call. Please let me know.