示例#1
0
 def twitter(service, link, title, desc):
     title = unicode(title, errors='ignore')
     from sfdr.modules.twitter import api
     import settings
     twitter = api(settings.TWITTER_PUB, settings.TWITTER_PRI, service.pubKey, service.priKey)
     logging.debug("Tweeting now to %s; link: \"%s\", ttl: \"%s\"" % (service.key, link, str(title.encode('ascii', 'ignore'))))
     twitter.post(link, title, desc, feed.preText, feed.postText)
示例#2
0
 def twitter(service, text, link):
     from sfdr.modules.twitter import api
     import settings
     twitter = api(settings.TWITTER_PUB, settings.TWITTER_PRI, service.pubKey, service.priKey)
     logging.debug("Tweeting now to %s; link: \"%s\", ttl: \"%s\"" % (service.key, link, text))
     twitter.push(text, link)