This repository has been archived by the owner on Jan 12, 2020. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
93 changed files
with
1,714 additions
and
365 deletions.
There are no files selected for viewing
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# Sphinx build info version 1 | ||
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done. | ||
config: b7193422f287ea4227b1fb251b6b92c4 | ||
tags: 645f666f9bcd5a90fca523b33c5a78b7 | ||
# Sphinx build info version 1 | ||
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done. | ||
config: b7193422f287ea4227b1fb251b6b92c4 | ||
tags: 645f666f9bcd5a90fca523b33c5a78b7 |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
*********************************** | ||
Kengaytmada xatoliklarni tekshirish | ||
*********************************** | ||
|
||
API xatoliklarni qayd qilish | ||
============================ | ||
|
||
Yii2-autopost kengaytmasi xabarlarni yuborish jarayonida API larda xatolik bo'lsa ``/src/logs`` papkasida o'sha kungi kun bilan fayl yaratadi. | ||
|
||
Agar kengaytmada oldini olib bo'lmas xatolik yoki kamchiliklar kuzatilsa yoki qo'shimcha imkoniyatlar qo'shish taklifi bo'lsa, kengaytmaning Githubdagi sahifasi https://github.com/bzimor/yii2-autopost ga kirib, o'z xissangizni qo'shishingiz mumkin. Bundan albatta xursand bo'laman. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
Facebook sozlamalari | ||
-------------------- | ||
|
||
Facebook ijtimoiy tarmog'idagi sahifangizga kengaytma orqali xabar yuborilishini ta'minlash uchun siz **o'sha sahifa admini** bo'lishingiz va quyidagilarni bajarishingiz kerak. | ||
|
||
Facebook da dastur yaratuvchi akkauntini faollashtirish | ||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
|
||
Facebook sahifasiga xabar chop etishda foydalaniladigan dastur yaratish uchun dastur yaratuvchi akkauntini faollashtirishingiz kerak bo'ladi. Buning uchun https://developers.facebook.com/docs/pages/getting-started#developer-account manziliga kiring va **Создать аккаунт разработчика** tugmasini bosing: | ||
|
||
.. image:: fb-1.png | ||
|
||
Facebook da dastur yaratish va dastur ma'lumotlarini olish | ||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
|
||
1. Dastur yaratuvchi akkaunti yaratilgandan so'ng sizga dastur yaratish oynasi ochiladi, oynadan **Создать ID приложения** tugmasini bosing: | ||
|
||
.. image:: fb-2.png | ||
|
||
2. Dastur nomini va pochta manzilingizni kiriting: | ||
|
||
.. image:: fb-3.png | ||
|
||
3. Dastur yaratilgandan so'ng, chap tarafdan **Панель** bo'limiga kirib, ``api versiyasi`` (1), ``App ID`` (2) va ``Api secret`` (3) larni ko'chirib oling: | ||
|
||
.. image:: fb-4.png | ||
|
||
.. image:: fb-5.png | ||
|
||
Facebook dasturi uchun Access token olish | ||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
|
||
1. Shundan so'ng https://developers.facebook.com/tools/explorer manziliga kirib, qizil bilan belgilangan joyni bosib, ro'yxatdan dasturingizni tanlang: | ||
|
||
.. image:: fb-6.png | ||
|
||
2. Rasmda ko'rsatilgan **Получить маркер** tugmasini bosib, eng quyidan **Получит маркер доступа пользователя** ni tanlang va ochilgan oynadan qizil bilan belgilanganlarini tanlab, **Получить маркер доступа** ni bosing: | ||
|
||
.. image:: fb-6a.png | ||
|
||
.. image:: fb-7.png | ||
|
||
3. Kichik bir oyna ochilgandan so'ng, davom etish, so'ngra ok tugmasini bosing: | ||
|
||
.. image:: fb-8.png | ||
|
||
4. Belgilangan joydan tokenni ko'chirib oling: | ||
|
||
.. image:: fb-9.png | ||
|
||
5. Ko'chirib olingan token **qisqa muddatli token** hisoblanadi. Uni uzoq muddatli tokenga almashtirish uchun dastur Api secret ini hamda dastur ID sini quyidagi linkga qo'yib, o'sha linkni brauzerda oching:: | ||
|
||
https://graph.facebook.com/oauth/access_token?client_id=<<Dasturingiz ID si>>&client_secret=<<Dasturingiz API Secreti>>&grant_type=fb_exchange_token&fb_exchange_token=<<Dasturingiz Access tokeni>> | ||
|
||
.. image:: fb-10.png | ||
|
||
6. Natijada siz **uzoq muddatli token** ga ega bo'lasiz. Bu tokenni **hech qachon eskirmaydigan token** ga almashtirish uchun quyidagi linkga uzoq muddatli token ni qo'yib brauzeringizda oching:: | ||
|
||
https://graph.facebook.com/me/accounts?access_token=<<uzoq muddatli token ingiz>> | ||
|
||
7. Va nihoyat siz **hech qachon eskirmaydigan token** ga ega bo'ldingiz. Bu yerdan ``Sahifa ID`` sini ham olish mumkin: | ||
|
||
.. image:: fb-11.png | ||
|
||
8. Agar yuqoridagi holatda ``sahifa ID`` siga ega bo'lmasangiz, Facebookdagi sahifangiz manziliga kirib, **Информация** bo'limidan olish mumkin: | ||
|
||
.. image:: fb-12.png | ||
|
||
9. Olingan ma'lumotlarni kengaytmadagi Facebook sozlamalariga yozib, saqlab qo'ying. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,3 +26,8 @@ Imkoniyatlari | |
|
||
installing | ||
settings | ||
telegram | ||
using | ||
debugging |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
Telegram sozlamalari | ||
-------------------- | ||
|
||
Telegram tarmog'ida kanalingizga kengaytma orqali xabar yuborilishini ta'minlash uchun, avvalo telegramda bot yaratib, yaratilgan botni **kanalingizga admin** sifatida qo'shishingiz lozim | ||
|
||
Telegramda bot yangi bot yaratish | ||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
|
||
Telegram da bot yaratish uchun quyidagilarni bajaring: | ||
|
||
1. Telegram qidiruv joyiga ``@botfather`` deb yozib(1), izlash tugmasini bosing va birinchi chiqqan natijaga kirib ``start`` tugmasini bosing(2): | ||
|
||
.. image:: tg-1.png | ||
|
||
2. Buyruqlar ichidan ``/newbot`` buyrug'ini tanlang yoki o'zingiz ``/newbot`` deb buyruq yuboring: | ||
|
||
.. image:: tg-2.png | ||
|
||
3. So'ngra, so'rovga asosan yaratilayotgan yangi **bot ismini** (1), botning **foydalanuv nomi** ni (2) kiriting, shundan so'ng sizga **Bot token** (3) taqdim qilinadi. Botning foydalanuv nomi takrorlanmagan hamda oxiri *"bot"* yoki *"_bot"* so'zi bilan tugashi kerak: | ||
|
||
.. image:: tg-3.png | ||
|
||
|
||
Kanal id sini aniqlash | ||
^^^^^^^^^^^^^^^^^^^^^^ | ||
|
||
1. Kanal id si o'rniga ``@<<kanal_nomi>>`` ni ham ishlatish mumkin. Kanal nomi bu yerda kanal linkining oxirgi qismi: ``https:// t.me/ <<kanal_nomi>>`` | ||
|
||
.. image:: tg-4.png | ||
|
||
Agar kanal ochiq bo'lmasa (private), u holda ``@getidsbot`` botini izlab toping, botga kirib ``/start`` ni bosing va kanalingizdagi biror xabarni **"forward"** qilib botga yuborsangiz, sizning kanalingiz id sini chiqarib beradi. | ||
|
||
.. image:: tg-5.png | ||
|
||
|
||
2. Yaratilgan botni kanalingizga admin sifatida qo'shing hamda olingan ma'lumotlarni kengaytma sozlamalariga kiriting. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
Twitter sozlamalari | ||
------------------- | ||
|
||
Twitter ijtimoiy tarmog'idagi sahifangizga kengaytma orqali xabar yuborilishini ta'minlash uchun quyidagilarni bajaring. | ||
|
||
Twitter da dastur yaratish | ||
^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
|
||
1. Twitter da dastur yaratish uchun https://apps.twitter.com/ manziliga kiring va ``Create New App`` tugmasini bosing: | ||
|
||
.. image:: tw-1.png | ||
|
||
2. So'ngra dastur nomi(1), dastur haqida ma'lumot(2), vebsayt(3) qatorlarini to'ldiring, shartlarga rozilik belgisini qo'yib, ``Create your Twitter application`` tugmasini bosing: | ||
|
||
.. image:: tw-2.png | ||
|
||
.. image:: tw-3.png | ||
|
||
Dastur ma'lumotlarini olish | ||
^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
|
||
1. Ochilgan oynadan **Keys and Access Tokens** bo'limiga o'ting. Bu yerdan siz ``Api key`` (1) hamda ``Api secret`` (2) larni olishingiz mumkin: | ||
|
||
.. image:: tw-4.png | ||
|
||
2. Shu sahifaning pastiga tushib, **Create my access token** tugmasini bosing, shunda sizga ``Access token`` (3) va ``Token secret`` (4) taqdim qilinadi: | ||
|
||
.. image:: tw-5.png | ||
|
||
.. image:: tw-6.png | ||
|
||
3. Olingan ma'lumotlarni kengaytma sozlamalaridagi kerakli qatorlarga qo'ying. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
************************ | ||
Kengaytmadan foydalanish | ||
************************ | ||
|
||
Kod ichida modul sifatida foydalanish | ||
===================================== | ||
|
||
Yii2-autopost kengaytmasi o'rnatilib, ijtimoiy tarmoq sozlamalari kiritilgach, kengaytmani o'z kodingiz ichida quyidagicha ishlatiladi: | ||
|
||
* Xabarlarni yuborish:: | ||
use Yii; | ||
... | ||
... | ||
$content = array(); | ||
$apimanager = Yii::$app->getModule('autopost')->apimanager; | ||
$content['title'] = 'Xabar sarlavhasi'; //Ixtiyoriy | ||
$content['message'] = 'Xabar matni'; //Ixtiyoriy | ||
$content['link'] = 'Xabar linki'; //Ixtiyoriy | ||
//Agar matn rasm sifatida yuboriladigan bo'lsa: | ||
$content['photo_url'] = 'https://www.google.com/images/branding/googlelogo/1x/googlelogo_color_272x92dp.png' //Rasmning to'liq url manzili | ||
/* | ||
* $share qiymati quyidagicha belgilanadi: | ||
* Telegram - 1, Facebook - 2, Twitter -4. | ||
* Agar xabar faqat Telegram ga yuborilsa $share = 1 bo'ladi, faqat Telegram va Twitter bo'lsa 1+4 = 5, $share = 5 bo'ladi, vhkz. | ||
* Agar $share ga qiymat berilmasa, o'z holicha 7 bo'lib, barcha tarmoqlarga yuboriladi. | ||
*/ | ||
$share = 1; //1-7 gacha raqamlardan biri | ||
/* | ||
* $type 'text' yoki 'photo' qiymatini qabul qiladi. Ya'ni matnli va rasmli xabarlar uchun | ||
* Agar $type o'zgaruvchisi berilmasa, har bir tarmoq uchun sozlamadagi xabar turi tanlanadi. | ||
*/ | ||
echo $apimanager->share($content, $share, $type); //natijani sahifada chop etish | ||
* Yuborilgan xabarlar tarixini ko'rish va ularni o'chirish ``http://<<Saytingiz-nomi>>/autopost`` sahifasi orqali amalga oshiriladi. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
.section img{ | ||
border: 1px solid #c5c5c5; | ||
} |
Oops, something went wrong.