' . wp_json_encode( $response ) ); } $id = $response->id; $display_name = $response->first_name; $account = $response->username; $this->service = array( 'id' => $id, 'service' => $this->service_name, 'credentials' => array( 'chat_id' => $data['chat_id'], 'access_token' => $data['access_token'], 'display_name' => $display_name, ), 'available_accounts' => array( $this->service_name . '_' . $id => array( 'id' => $id, 'user' => $display_name, 'account' => $account, 'service' => $this->service_name, 'img' => apply_filters( 'rop_custom_telegram_avatar', $telegram->get_profile_photo( $id ) ), 'created' => date( 'd/m/Y H:i' ), 'active' => isset( $data['active'] ) ? $data['active'] : true, ), ), ); } catch ( \Exception $e ) { $this->logger->alert_error( 'Telegram API Error: ' . $e->getMessage() ); return false; } return true; } /** * Method for creating media posts on Telegram. * * @since 9.1.3 * @access private * * @param array $post_details The post details to be published by the service. * @param array $hashtags Hashtags. * @param array $args Optional arguments needed by the method. * @param int $chat_id The chat id. * * @return array $new_post The post contents */ private function tlg_media_post( $post_details, $hashtags, $args, $chat_id ) { $attachment_url = $post_details['post_image']; // If the post has no image but "Share as image post" is checked // share as an article post. if ( empty( $attachment_url ) ) { $this->logger->info( 'No image set for post, but "Share as Image Post" is checked. Falling back to article post' ); return $this->tlg_article_post( $post_details, $hashtags, $args, $owner_id ); } $new_post = array( 'chat_id' => $chat_id, 'caption' => $post_details['content'] . $this->get_url( $post_details ) . $hashtags, ); // If attachment is video. if ( strpos( $post_details['mimetype']['type'], 'video' ) !== false ) { $new_post['video'] = $attachment_url; } else { $new_post['photo'] = $attachment_url; } return $new_post; } /** * Method for text posts to Telegram. * * @since 9.1.3 * @access private * * @param array $post_details The post details to be published by the service. * @param array $hashtags Hashtags. * @param array $args Optional arguments needed by the method. * @param string $chat_id arguments needed by the method. * * @return array $new_post The post contents */ private function tlg_text_post( $post_details, $hashtags, $args, $chat_id ) { $new_post = array( 'chat_id' => $chat_id, 'text' => $post_details['content'] . $hashtags, ); return $new_post; } /** * Method for creating link(article) posts to Telegram. * * @since 9.1.3 * @access private * * @param array $post_details The post details to be published by the service. * @param array $hashtags Hashtags. * @param array $args arguments needed by the method. * @param string $chat_id arguments needed by the method. * * @return object */ private function tlg_article_post( $post_details, $hashtags, $args, $chat_id ) { $content = sprintf( "%s\r\n%s\r\n%s", $post_details['content'], $this->get_url( $post_details ), $hashtags ); $new_post = array( 'chat_id' => $chat_id, 'text' => $content, 'parse_mode' => 'HTML', ); return $new_post; } /** * Method for publishing with Telegram service. * * @since 9.1.3 * @access public * * @param array $post_details The post details to be published by the service. * @param array $args Optional arguments needed by the method. * * @return mixed */ public function share( $post_details, $args = array() ) { if ( Rop_Admin::rop_site_is_staging( $post_details['post_id'] ) ) { $this->logger->alert_error( Rop_I18n::get_labels( 'sharing.share_attempted_on_staging' ) ); return false; } $post_id = $post_details['post_id']; $chat_id = $args['credentials']['chat_id']; $access_token = $args['credentials']['access_token']; $post_url = $post_details['post_url']; $share_as_image_post = $post_details['post_with_image']; $model = new Rop_Post_Format_Model(); $post_format = $model->get_post_format( $post_details['account_id'] ); $hashtags = $post_details['hashtags']; if ( ! empty( $post_format['hashtags_randomize'] ) && $post_format['hashtags_randomize'] ) { $hashtags = $this->shuffle_hashtags( $hashtags ); } // Telegram link post. if ( ! empty( $post_url ) && empty( $share_as_image_post ) && get_post_type( $post_id ) !== 'attachment' ) { $new_post = $this->tlg_article_post( $post_details, $hashtags, $args, $chat_id ); } // Telegram plain text post. if ( empty( $share_as_image_post ) && empty( $post_url ) ) { $new_post = $this->tlg_text_post( $post_details, $hashtags, $args, $chat_id ); } // Telegram media post. if ( ! empty( $share_as_image_post ) || get_post_type( $post_id ) === 'attachment' ) { $new_post = $this->tlg_media_post( $post_details, $hashtags, $args, $chat_id ); } if ( empty( $new_post ) ) { $this->logger->alert_error( Rop_I18n::get_labels( 'misc.no_post_data' ) ); return false; } $api = $this->get_api( $access_token ); try { $response = $api->send_message( $new_post ); if ( $response && $response->message_id ) { // Save log. $this->save_logs_on_rop( array( 'network' => $post_details['service'], 'handle' => $args['user'], 'content' => $post_details['content'], 'link' => $post_details['post_url'], ) ); $this->logger->alert_success( sprintf( 'Successfully shared %s to %s on Telegram ', html_entity_decode( get_the_title( $post_details['post_id'] ) ), $args['user'] ) ); return true; } } catch ( \Telegram\Bot\Exceptions\TelegramSDKException $e ) { $this->logger->alert_error( 'Error sharing to Telegram: ' . $e->getMessage() ); return false; } catch ( \Exception $e ) { $this->logger->alert_error( 'Error sharing to Telegram: ' . $e->getMessage() ); return false; } } /** * Method to populate additional data. * * @since 9.1.3 * @access public * @return mixed */ public function populate_additional_data( $account ) { return $account; } } Une société de la place recrute - EmploiTogo.INFO

EmploiTogo.INFO

La Plateforme des opportunités au TOGO et en Afrique

Une société de la place recrute

opération de publicité vente

Étudiants temporairement libres , les travailleurs en free-lance, les sans emploi, les hommes de métier en fin de formation , les togolais en tout lieux et tout endroit ; voilà arrivé le moment de vous occupez et gagner de l’argent pour la réalisation de vos diverses projets. Pour l’heure, nous recrutons des jeunes de toute catégorie pour une grande opération de publicité vente de nos produits cosmétiques et autres à Lomé et ses environs.

Cette opération est pour toi une occasion pour mieux appréhender le marché, connaître tes forces et faiblesses et mieux te préparer pour tes initiatives personnelles.

Profil recherché :

jeune fille / jeune homme

Durée des opérations :

30 jours (un mois d’activité)

Rémunération:

75000 fcfa (+ des primes d’encouragement journaliers )

Avantages :

(ce que l’on gagne en travaillant avec nous)

Pour cette occasion,

le transport aller retour et l’hébergement sont pris en charge par l’entreprise
une formation gratuite en marketing et stratégie de vente
obtention d’une attestation en fin d’activité qui peut servir avec le temps

NB : à la fin des différents contrats, les postulants bénéficieront d’un suivi et accompagnement de la part de l’entreprise pour la réalisation de leurs différents projets.

Info Line et inscription

(nom, prénom,l’âge ,quartier et numéro de téléphone) : 96 61 43 43 (wathsap)

Lire aussi:

 

Africsearch Togo recrute-22/05/2025

Avis d’appel d’offres de la GIZ-22/05/2025

Laisser un commentaire

Votre adresse e-mail ne sera pas publiée. Les champs obligatoires sont indiqués avec *

Ce site utilise Akismet pour réduire les indésirables. En savoir plus sur la façon dont les données de vos commentaires sont traitées.

WhatsApp Rejoins +22k autres abonnés sur notre chaîne