public function flagPost($pid, $type) {
		if(!is_string($pid)) {
			throw new LinkedInException('LinkedIn->flagPost(): bad data passed, $pid must be of type string');
		}
		if(!is_string($type)) {
			throw new LinkedInException('LinkedIn->flagPost(): bad data passed, $like must be of type string');
		}
		//Constructing the xml
		$data = '<?xml version="1.0" encoding="UTF-8"?>';
		switch($type) {
			case 'promotion':
				$data .= '<code>promotion</code>';
				break;
			case 'job':
				$data .= '<code>job</code>';
				break;
			default: 
				throw new LinkedInException('LinkedIn->flagPost(): invalid value for $type, must be one of: "promotion", "job"');
				break;	
		}
		
		// construct and send the request
		$query    = self::_URL_API . '/v1/posts/' . $pid . '/category/code';
		$response = $this->fetch('PUT', $query, $data);
		  
  	/**
     * Check for successful request (a 204 response from LinkedIn server) 
	   * per the documentation linked in method comments above.
	   */
		return $this->checkResponse(204, $response);
	}
public function flagPost($pid, $type) {
		if(!is_string($pid)) {
			throw new LinkedInException('LinkedIn->flagPost(): bad data passed, $pid must be of type string');
		}
		if(!is_string($type)) {
			throw new LinkedInException('LinkedIn->flagPost(): bad data passed, $like must be of type string');
		}
		//Constructing the xml
		$data = '<?xml version="1.0" encoding="UTF-8"?>';
		switch($type) {
			case 'promotion':
				$data .= '<code>promotion</code>';
				break;
			case 'job':
				$data .= '<code>job</code>';
				break;
			default: 
				throw new LinkedInException('LinkedIn->flagPost(): invalid value for $type, must be one of: "promotion", "job"');
				break;	
		}
		
		// construct and send the request
		$query    = self::_URL_API . '/v1/posts/' . $pid . '/category/code';
		$response = $this->fetch('PUT', $query, $data);
		  
  	/**
     * Check for successful request (a 204 response from LinkedIn server) 
	   * per the documentation linked in method comments above.
	   */
		return $this->checkResponse(204, $response);
	}
public function flagPost ( $ pid , $ type ) { if ( ! is_string ( $ pid ) ) { throw new LinkedInException ( 'LinkedIn->flagPost(): bad data passed, $pid must be of type string' ) ; } if ( ! is_string ( $ type ) ) { throw new LinkedInException ( 'LinkedIn->flagPost(): bad data passed, $like must be of type string' ) ; } //Constructing the xml $ data = '<?xml version="1.0" encoding="UTF-8"?>' ; switch ( $ type ) { case 'promotion' : $ data .= '<code>promotion</code>' ; break ; case 'job' : $ data .= '<code>job</code>' ; break ; default : throw new LinkedInException ( 'LinkedIn->flagPost(): invalid value for $type, must be one of: "promotion", "job"' ) ; break ; } // construct and send the request $ query = self :: _URL_API . '/v1/posts/' . $ pid . '/category/code' ; $ response = $ this -> fetch ( 'PUT' , $ query , $ data ) ; /**
     * Check for successful request (a 204 response from LinkedIn server) 
	   * per the documentation linked in method comments above.
	   */ return $ this -> checkResponse ( 204 , $ response ) ; }
This flags a specified post as specified by type.

http://developer.linkedin.com/documents/groups-api

@param str $pid
The post id.
@param str $type
The type to flag the post as.

@return arr
Array containing retrieval success, LinkedIn response.
This flags a specified post as specified by type .