PHP Classes

File: README.md

Recommend this page to a friend!
  Packages of Ákos Nikházy   Post to Telegram Wordpress Plugin   README.md   Download  
File: README.md
Role: Documentation
Content type: text/markdown
Description: Documentation
Class: Post to Telegram Wordpress Plugin
Post a link of a WordPress article in Telegram
Author: By
Last change:
Date: 8 months ago
Size: 1,255 bytes
 

Contents

Class file image Download

post-to-telegram-wordpress-plugin

This ads a metabox to the post editor that lets you post your post's link to a chat or channel. You just need the chat id and a Telegram bot as admin in the target and its token.

How to use?

Copy the PHP file in the wp-content/plugins folder or zip it and upload it in the admin page's plugin uploader.

After install you have to do these steps to aquire the needed data to this to work:

  1. If you do not have one create a Channel on Telegram.
  2. Get the channel ID by forwarding a post from the channel to the IDBot (@username_to_id_bot). Write down your Channel ID.
  3. Create a new bot with the Bot Father (@BotFather). Follow its instructions. You will recieve the bot token. Write it down. Remember, this is a token that gives anyone knowing it full control over your bot. This plugin saves the token in an encrypted form. Never share it with anyone.
  4. Add your bot as an administrator to the channel. It only needs message rights to work.
  5. Enter the chat id and bot token in the fields above.
  6. When you writing a new post or updateing an existing one, check the checkbox and optionally wirte a text in the metabox. The message with a link to the post will be sent to the channel when you save the post.