a
var
- 这是正确的cURL请求吗?
请参阅postfollow功能(我的密码)。
我希望postUnfollow功能会触发自动取消关注用户。
答案 0 :(得分:3)
请检查我下面的代码并检查其是否正常工作
public function PostUnFollow($user_id,$username) {
$device_id = "android-".$this->guid;
$data = '{"device_id":"'.$device_id.'","guid":"'. $this->guid .'","uid":"'.$this->my_uid.'","module_name":"feed_timeline","user_id":"'.$user_id.'","source_type":"5","filter_type":"0","extra":"{}","Content-Type":"application/x-www-form-urlencoded; charset=UTF-8"}';
$sig = $this->GenerateSignature($data);
$new_data = 'signed_body='.$sig.'.'.urlencode($data).'&ig_sig_key_version=6';
return $this->Request('friendships/destroy/'.$user_id.'/', true, $new_data, true,$username);
}