Skip to content

Instantly share code, notes, and snippets.

@niraj-shah
Created May 11, 2013 21:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save niraj-shah/5561451 to your computer and use it in GitHub Desktop.
Save niraj-shah/5561451 to your computer and use it in GitHub Desktop.
Share Facebook Share (PHP Code Igniter) code
public function save_share() {
$response = array( 'response' => 'true' );
$this->load->model( 'Share_model' );
$meta = $this->input->post('meta');
$insert = array(
'share_type' => $type,
'share_meta' => $meta['post_id'],
'share_date' => date( 'Y-m-d h:i:s' )
);
$query = $this->db->insert( 'shares', $insert );
$data['response'] = $response;
$this->load->view( 'json', $data );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment