this twitter stuff sucks. doesn't work actually
This commit is contained in:
parent
9b38c424f8
commit
4c40cbcfe9
1 changed files with 8 additions and 8 deletions
|
|
@ -1,8 +1,10 @@
|
||||||
"""
|
"""
|
||||||
The tweet/twitter task.
|
The tweet/twitter task.
|
||||||
|
|
||||||
|
Uses: tweepy
|
||||||
"""
|
"""
|
||||||
|
|
||||||
import twitter
|
import tweepy
|
||||||
from lib.tasks.task import Task
|
from lib.tasks.task import Task
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -15,13 +17,11 @@ class TweetTask(Task):
|
||||||
self.set_task_type(kwargs["type"])
|
self.set_task_type(kwargs["type"])
|
||||||
self.recipient = kwargs["args"]["rcpt"]
|
self.recipient = kwargs["args"]["rcpt"]
|
||||||
|
|
||||||
def execute(self, msg):
|
def execute(self, msg, core):
|
||||||
api = twitter.Api(consumer_key='consumer_key',
|
auth = tweepy.BasicAuthHandler("user", "pass")
|
||||||
consumer_secret='consumer_secret',
|
api = tweepy.API(auth)
|
||||||
access_token_key='access_token',
|
api.update_status(self.recipient)
|
||||||
access_token_secret='access_token_secret')
|
print(self.get_task_type())
|
||||||
status = api.PostUpdate(msg)
|
|
||||||
pass
|
|
||||||
|
|
||||||
|
|
||||||
def create(taskDict):
|
def create(taskDict):
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue