captn3m0 / ifttt-webhook

:recycle: A webhook middleware for the ifttt.com service
https://github.com/captn3m0/ifttt-webhook
304 stars 67 forks source link

Revert back to previous settings where "tags" field used for remote webhook url. #4

Open khurshid-alam opened 10 years ago

khurshid-alam commented 10 years ago

Few days ago tags field in WordPress is used for remote web-hook url where body is preserved for sending a more data to web-hook. I don't understand what is the reason for changing this.

Now that tag field is ignored & body is being used for providing remote url there is one less field to send data with.

I would prefer this as a #payload:

{
    user: "username specified in ifttt",
    password: "password specified in ifttt",
    title: "title generated for the recipe in ifttt",
    categories:['array','of','categories','passed'],
    description:"Body of the blog post as created in ifttt recipe"
}

Now all my web-hooks recopies are broken. Plz fix it.

captn3m0 commented 10 years ago

The reason behind the change was that the mt_keywords field (tags) was getting truncated to ~120 characters by ifttt. In order to have support for longer urls, the description field (body) now holds the URL. You can still use the title and categories field for passing data. You can update your recipe and it should just work.

khurshid-alam commented 10 years ago

Understood. But the problem is IFTTT does the same thing with title & tags (i.e in past I have experienced problems with long title). May be tag field can be utilized here instead of leaving it blank.

And how exactly categories is supposed to work? I tried with putting these data in categories=data1, data2, data3 & then tried to get that in php:

{

$res = file_get_contents('php://input');
$data = json_decode($res);
$cat = $data->categories;
print_r($cat);
var_dump($cat);

}

But it didn't print anything.