Help encoding a cURL argument (works fine from the command line, but not from a PHP script) -
i working facebook api, , use following command via terminal post message users wall. curl -f 'access_token=xxxxxxxxxx' \ -f 'message=hello world' \ -f 'to={["id":xxxxxxx]}' \ https://graph.facebook.com/me/feed this works great. trying same via php code; $fields = array( 'access_token' => $t, 'message' => $message, 'to' => '{["id":'.$id.']}' ); $ch = curl_init(); curl_setopt($ch, curlopt_url, $url); curl_setopt($ch, curlopt_post, 1); curl_setopt($ch, curlopt_postfields, $fields); curl_exec($ch); curl_close($ch); this code successfuly posts message, own wall (i.e. ignoring 'to' parameter). i'm new curl, , i'm sure encoding wrong, or maybe missing curl flag, i've been through several tutorials on posting via curl, including few answers, , can't see i'm missing. really appreciate help! what print out? if ( 'post...