This file contains hidden or 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
| <?php | |
| namespace Drupal\custom_logic\Entity\Node; | |
| use Drupal\Core\Annotation\Translation; | |
| use Drupal\Core\Url; | |
| /** | |
| * Class Notifications. Represents the Notficiations Node bundle. | |
| * |
This file contains hidden or 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
| # Tested on Pycharm. You will need to have access to the twitter account and obtain Consumer key and Consumer secret from apps.twitter.com | |
| import twitter # pip install python-twitter | |
| import csv | |
| import io | |
| import codecs | |
| from requests_oauthlib import OAuth1Session # pip install requests requests_oauthlib | |
| REQUEST_TOKEN_URL = 'https://api.twitter.com/oauth/request_token' | |
| ACCESS_TOKEN_URL = 'https://api.twitter.com/oauth/access_token' |