How can I get node url in rules for facebook auto post
Make sure when you use [node:url] in any code, it must be in "" so for example

$path = [node:url];


is wrong, it must be

$path = "[node:url]";


As another solution

When you Set a data value you can use Value textarea and php codes to generate the node url. 

this is an example where I post a trimmed field_body and the node url to Facebook. If you need to post the node alias to Facebook, you can use 

$nid = [node:nid];
$path = drupal_get_path_alias('node/$nid');


to get the alias then print it in the &lt;?php segment.